Search in sources :

Example 1 with GraphDatabaseFactoryState

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());
}
Also used : Neo4jJobScheduler(org.neo4j.kernel.impl.util.Neo4jJobScheduler) LogProvider(org.neo4j.logging.LogProvider) NullLogProvider(org.neo4j.logging.NullLogProvider) Config(org.neo4j.kernel.configuration.Config) IndexSamplingConfig(org.neo4j.kernel.impl.api.index.sampling.IndexSamplingConfig) GraphDatabaseFactoryState(org.neo4j.graphdb.factory.GraphDatabaseFactoryState) GraphDatabaseFacadeFactory(org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory) GraphDatabaseFacade(org.neo4j.kernel.impl.factory.GraphDatabaseFacade) PlatformModule(org.neo4j.kernel.impl.factory.PlatformModule) File(java.io.File) LogService(org.neo4j.kernel.impl.logging.LogService) NullLogService(org.neo4j.kernel.impl.logging.NullLogService)

Aggregations

File (java.io.File)1 GraphDatabaseFactoryState (org.neo4j.graphdb.factory.GraphDatabaseFactoryState)1 Config (org.neo4j.kernel.configuration.Config)1 IndexSamplingConfig (org.neo4j.kernel.impl.api.index.sampling.IndexSamplingConfig)1 GraphDatabaseFacade (org.neo4j.kernel.impl.factory.GraphDatabaseFacade)1 GraphDatabaseFacadeFactory (org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory)1 PlatformModule (org.neo4j.kernel.impl.factory.PlatformModule)1 LogService (org.neo4j.kernel.impl.logging.LogService)1 NullLogService (org.neo4j.kernel.impl.logging.NullLogService)1 Neo4jJobScheduler (org.neo4j.kernel.impl.util.Neo4jJobScheduler)1 LogProvider (org.neo4j.logging.LogProvider)1 NullLogProvider (org.neo4j.logging.NullLogProvider)1