Neo4jManager.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:bio4j-neo4j 作者:
public Neo4jManager(String dbFolder, boolean createServices, boolean readOnly, Map<String, String> config) {

    if (createServices) {
        if(!readOnly){
            if(config != null){                                     
                graphService = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(dbFolder).setConfig(config).newGraphDatabase();
            }else{
                graphService = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(dbFolder).newGraphDatabase();
            }

        }else{

            if(config != null){
                config.put( "read_only", "true" );
                graphService = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(dbFolder).setConfig(config).newGraphDatabase();
            }else{
                config = new HashMap<>();
                config.put( "read_only", "true" );
                graphService = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(dbFolder).setConfig(config).newGraphDatabase();
            }                
        }            
    }        
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号