use of org.neo4j.graphdb.factory.GraphDatabaseFactoryState in project neo4j by neo4j.
the class NonUniqueIndexTests method newEmbeddedGraphDatabaseWithSlowJobScheduler.
private GraphDatabaseService newEmbeddedGraphDatabaseWithSlowJobScheduler() {
GraphDatabaseFactoryState graphDatabaseFactoryState = new GraphDatabaseFactoryState();
graphDatabaseFactoryState.setUserLogProvider(NullLogService.getInstance().getUserLogProvider());
return new GraphDatabaseFacadeFactory(DatabaseInfo.COMMUNITY, CommunityEditionModule::new) {
@Override
protected PlatformModule createPlatform(File storeDir, Config config, Dependencies dependencies, GraphDatabaseFacade graphDatabaseFacade) {
return new PlatformModule(storeDir, config, databaseInfo, dependencies, graphDatabaseFacade) {
@Override
protected Neo4jJobScheduler createJobScheduler() {
return newSlowJobScheduler();
}
@Override
protected LogService createLogService(LogProvider userLogProvider) {
return NullLogService.getInstance();
}
};
}
}.newFacade(directory.graphDbDir(), Config.embeddedDefaults(), graphDatabaseFactoryState.databaseDependencies());
}
Aggregations