• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java StringLogger类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.neo4j.kernel.impl.util.StringLogger的典型用法代码示例。如果您正苦于以下问题:Java StringLogger类的具体用法?Java StringLogger怎么用?Java StringLogger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StringLogger类属于org.neo4j.kernel.impl.util包,在下文中一共展示了StringLogger类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: loadExtensionConfigurations

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
Collection<KernelExtension<?>> loadExtensionConfigurations( StringLogger msgLog )
{
    Collection<KernelExtension<?>> loadedExtensions = new ArrayList<KernelExtension<?>>();
    for ( KernelExtension<?> extension : Service.load( KernelExtension.class ) )
    {
        try
        {
            extension.loadConfiguration( this );
            loadedExtensions.add( extension );
        }
        catch ( Throwable t )
        {
            msgLog.logMessage( "Failed to init extension " + extension, t, true );
        }
    }
    return loadedExtensions;
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:18,代码来源:KernelData.java


示例2: loadExtensions

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
void loadExtensions( Collection<KernelExtension<?>> loadedExtensions, StringLogger msgLog )
{
    for ( KernelExtension<?> extension : loadedExtensions )
    {
        try
        {
            @SuppressWarnings( "hiding" ) Object state = extension.load( this );
            if ( state != null )
            {
                setState( extension, state );
            }
            msgLog.logMessage( "Extension " + extension + " loaded ok", true );
        }
        catch ( Throwable cause )
        {
            msgLog.logMessage( "Failed to load extension " + extension, cause, true );
        }
    }
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:20,代码来源:KernelData.java


示例3: shutdown

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
synchronized void shutdown( StringLogger msgLog )
{
    try
    {
        for ( Map.Entry<KernelExtension<?>, Object> loaded : state.entrySet() )
        {
            try
            {
                unload( loaded.getKey(), loaded.getValue() );
            }
            catch ( Throwable cause )
            {
                msgLog.logMessage( "Error unloading " + loaded, cause, true );
            }
        }
    }
    finally
    {
        state.clear();
        removeInstance( instanceId );
    }
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:23,代码来源:KernelData.java


示例4: stop

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
@Override
public void stop()
{
    if ( txLog != null )
    {
        try
        {
            txLog.close();
        }
        catch ( IOException e )
        {
            log.log( Level.WARNING, "Unable to close tx log[" + txLog.getName() + "]", e );
        }
    }
    msgLog.logMessage( "TM shutting down", true );
    StringLogger.close( txLogDir );
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:18,代码来源:TxManager.java


示例5: XaLogicalLog

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
XaLogicalLog( String fileName, XaResourceManager xaRm, XaCommandFactory cf,
    XaTransactionFactory xaTf, Map<Object,Object> config )
{
    this.fileName = fileName;
    this.xaRm = xaRm;
    this.cf = cf;
    this.xaTf = xaTf;
    this.logBufferFactory = (LogBufferFactory) config.get( LogBufferFactory.class );
    log = Logger.getLogger( this.getClass().getName() + File.separator + fileName );
    sharedBuffer = ByteBuffer.allocateDirect( 9 + Xid.MAXGTRIDSIZE
        + Xid.MAXBQUALSIZE * 10 );
    storeDir = (String) config.get( "store_dir" );
    msgLog = StringLogger.getLogger( storeDir);

    // We should turn keep-logs on if there are previous logs around,
    // this so that e.g. temporary shell sessions or operations don't create
    // holes in the log history, because it's just annoying.
    keepLogs = hasPreviousLogs();
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:20,代码来源:XaLogicalLog.java


示例6: loadIndexImplementations

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
void loadIndexImplementations( IndexManagerImpl indexes, StringLogger msgLog )
{
    for ( IndexProvider index : Service.load( IndexProvider.class ) )
    {
        try
        {
            indexes.addProvider( index.identifier(), index.load( this ) );
        }
        catch ( Throwable cause )
        {
            msgLog.logMessage( "Failed to load index provider " + index.identifier(), cause );
        }
    }
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:15,代码来源:KernelData.java


示例7: TxManager

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
TxManager( String txLogDir, KernelPanicEventGenerator kpe, TxFinishHook finishHook )
{
    this.txLogDir = txLogDir;
    this.msgLog = StringLogger.getLogger( txLogDir );
    this.kpe = kpe;
    this.finishHook = finishHook;
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:8,代码来源:TxManager.java


示例8: setLogicalLog

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
synchronized void setLogicalLog( XaLogicalLog log )
{
    this.log = log;
    if ( log != null )
    {
        this.msgLog = log.getStringLogger();
    }
    else
    {
        this.msgLog = StringLogger.SYSTEM;
    }
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:13,代码来源:XaResourceManager.java


示例9: BatchInserterImpl

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
public BatchInserterImpl( String storeDir,
    Map<String,String> stringParams )
{
    rejectAutoUpgrade( stringParams );
    msgLog = StringLogger.getLogger( storeDir );
    Map<Object,Object> params = getDefaultParams();
    params.put( Config.USE_MEMORY_MAPPED_BUFFERS, "false" );
    boolean dump = Boolean.parseBoolean( stringParams.get( Config.DUMP_CONFIGURATION ) );
    new AutoConfigurator( storeDir, false, dump ).configure( params );
    for ( Map.Entry<String,String> entry : stringParams.entrySet() )
    {
        params.put( entry.getKey(), entry.getValue() );
    }
    this.storeDir = storeDir;
    this.idGeneratorFactory = CommonFactories.defaultIdGeneratorFactory();
    params.put( IdGeneratorFactory.class, idGeneratorFactory );
    params.put( FileSystemAbstraction.class, CommonFactories.defaultFileSystemAbstraction() );
    String store = fixPath( storeDir, params );
    params.put( "neo_store", store );
    if ( dump )
    {
        Config.dumpConfiguration( params );
    }
    msgLog.logMessage( Thread.currentThread() + " Starting BatchInserter(" + this + ")" );
    neoStore = new NeoStore( params );
    if ( !neoStore.isStoreOk() )
    {
        throw new IllegalStateException( storeDir + " store is not cleanly shutdown." );
    }
    neoStore.makeStoreOk();
    PropertyIndexData[] indexes =
        getPropertyIndexStore().getPropertyIndexes( 10000 );
    indexHolder = new PropertyIndexHolder( indexes );
    RelationshipTypeData[] types =
        getRelationshipTypeStore().getRelationshipTypes();
    typeHolder = new RelationshipTypeHolder( types );
    graphDbService = new BatchGraphDatabaseImpl( this );
    indexStore = new IndexStore( storeDir );
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:40,代码来源:BatchInserterImpl.java


示例10: shutdown

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
public void shutdown()
{
    graphDbService.clearCaches();
    neoStore.close();
    msgLog.logMessage( Thread.currentThread() + " Clean shutdown on BatchInserter(" + this + ")", true );
    StringLogger.close( storeDir );
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:8,代码来源:BatchInserterImpl.java


示例11: loadIdGenerator

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
private void loadIdGenerator()
{
    try
    {
        if ( !isReadOnly() || isBackupSlave() )
        {
            openIdGenerator();
        }
        else
        {
            openReadOnlyIdGenerator( getEffectiveRecordSize());
        }
    }
    catch ( InvalidIdGeneratorException e )
    {
        setStoreNotOk( e );
    }
    finally
    {
        if ( !getStoreOk() )
        {
            if ( getConfig() != null )
            {
                String storeDir = (String) getConfig().get( "store_dir" );
                StringLogger msgLog = StringLogger.getLogger( storeDir );
                msgLog.logMessage( getStorageFileName() + " non clean shutdown detected", true );
            }
        }
    }
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:31,代码来源:CommonAbstractStore.java


示例12: importFromN4j

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
/**
 * 
 * @param dbService
 * @param KG 
 */
public static void importFromN4j(GraphDatabaseService dbService, KnowledgeGraph KG) {
    ExecutionResult result;
    ExecutionEngine engine = new ExecutionEngine(dbService, StringLogger.SYSTEM);
    
    try(Transaction importDb = dbService.beginTx()) {
        result = engine.execute("start n=node(*) return n");
        scala.collection.immutable.Vector<Object> results = result.columnAs("n").toVector();
        
        for(int i = 0; i < results.length(); i++) {
            org.neo4j.graphdb.Node node = (org.neo4j.graphdb.Node) results.getElem(i, 0);
            
            switch((String) node.getProperty("type")) {
                case "HumanAgent":
                    Agent a = new HumanAgent((String) node.getProperty("name"));
                    a.setId((int) node.getProperty("id"));
                    KG.addResource(a);
                    break;
                    
                case "ArtificialAgent":
                    Agent aa = new ArtificialAgent((String) node.getProperty("name"));
                    aa.setId((int) node.getProperty("id"));
                    KG.addResource(aa);
                    break;
                    
                case "Topic":
                    Topic t = new Topic((String) node.getProperty("name"));
                    t.setId((int) node.getProperty("id"));
                    KG.addResource(t);
                    break;
                    
                case "Document":
                    Document d = new Document((String) node.getProperty("name"));
                    d.setId((int) node.getProperty("id"));
                    KG.addResource(d);
                    break;
            }
            
            if(((String) node.getProperty("type")).contains("Viewpoint")) {
                ConnectedViewpoint v;
                Agent emitter = null;
                ArrayList<Resource> o = new ArrayList<>();

                Iterable<Relationship> expressesRels =  node.getRelationships(N4jEdgeType.EXPRESSES_VIEWPOINT);
                for(Relationship expressesRel : expressesRels)
                    emitter = (Agent) KG.getNamedObject((String) expressesRel.getOtherNode(node).getProperty("name"));

                Iterable<Relationship> connectorRels =  node.getRelationships(N4jEdgeType.VIEWPOINT_CONNECTOR);
                for(Relationship connectorRel : connectorRels)
                    o.add(KG.getNamedObject((String) connectorRel.getOtherNode(node).getProperty("name")));

                v = ViewpointFactory.newInstance(emitter, o.get(0), o.get(1), (String) node.getProperty("type"), ViewpointPolarity.POSITIVE);
                emitter.getPerspective().addViewpoint(v);
                v.setCorrespondingNode(node);
                KG.addViewpoint(v);
                break;
            }
            
        }
        
        importDb.success();
    }
}
 
开发者ID:sifrproject,项目名称:viewpoints_io,代码行数:68,代码来源:N4jImportModule.java


示例13: ZmqServer

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
public ZmqServer(GraphDatabaseService db, StringLogger logger, HostnamePort hostnamePort, Integer numThreads) {
}
 
开发者ID:TinderBackend,项目名称:neo4j-zmq-extension,代码行数:3,代码来源:ZmqServer.java


示例14: getStringLogger

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
StringLogger getStringLogger()
{
    return msgLog;
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:5,代码来源:XaLogicalLog.java


示例15: XaDataSource

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
/**
 * Constructor used by the Neo4j kernel to create datasources.
 *
 * @param params
 *            A map containing configuration parameters
 */
public XaDataSource( Map<?,?> params ) throws InstantiationException
{
    String storeDir = (String) params.get( "store_dir" );
    msgLog = StringLogger.getLogger( storeDir );
}
 
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:12,代码来源:XaDataSource.java


示例16: Neo4JExecutor

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
/**
 * Creates a new Executor wich queries the given database.
 * 
 * @param db
 */
public Neo4JExecutor(Neo4JConnection db) {
	cypher = new ExecutionEngine(db.getConnection(), StringLogger.DEV_NULL);
}
 
开发者ID:trustathsh,项目名称:visitmeta,代码行数:9,代码来源:Neo4JExecutor.java


示例17: getStringLogger

import org.neo4j.kernel.impl.util.StringLogger; //导入依赖的package包/类
StringLogger getStringLogger(); 
开发者ID:TinderBackend,项目名称:neo4j-zmq-extension,代码行数:2,代码来源:ZmqKernelExtensionFactory.java



注:本文中的org.neo4j.kernel.impl.util.StringLogger类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java WebDelegatingSubject类代码示例发布时间:2022-05-23
下一篇:
Java ChunkProviderServer类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap