Search in sources :

Example 1 with DatabaseManagementServiceFactory

use of org.neo4j.graphdb.facade.DatabaseManagementServiceFactory in project neo4j by neo4j.

the class CommitContentionTest method createDb.

private GraphDatabaseService createDb() {
    Config cfg = Config.newBuilder().set(neo4j_home, testDirectory.absolutePath()).build();
    managementService = new DatabaseManagementServiceFactory(DbmsInfo.COMMUNITY, globalModule -> new CommunityEditionModule(globalModule) {

        @Override
        public DatabaseTransactionStats createTransactionMonitor() {
            return new SkipTransactionDatabaseStats();
        }
    }).build(cfg, GraphDatabaseDependencies.newDependencies().dependencies(noOpSystemGraphInitializer(cfg)));
    return managementService.database(cfg.get(GraphDatabaseSettings.default_database));
}
Also used : DatabaseManagementServiceFactory(org.neo4j.graphdb.facade.DatabaseManagementServiceFactory) CommunityEditionModule(org.neo4j.graphdb.factory.module.edition.CommunityEditionModule) Config(org.neo4j.configuration.Config) DatabaseTransactionStats(org.neo4j.kernel.impl.transaction.stats.DatabaseTransactionStats)

Aggregations

Config (org.neo4j.configuration.Config)1 DatabaseManagementServiceFactory (org.neo4j.graphdb.facade.DatabaseManagementServiceFactory)1 CommunityEditionModule (org.neo4j.graphdb.factory.module.edition.CommunityEditionModule)1 DatabaseTransactionStats (org.neo4j.kernel.impl.transaction.stats.DatabaseTransactionStats)1