Search in sources :

Example 21 with GraphDatabaseBuilder

use of org.neo4j.graphdb.factory.GraphDatabaseBuilder in project neo4j by neo4j.

the class TestLuceneBatchInsert method switchToGraphDatabaseService.

private void switchToGraphDatabaseService(ConfigurationParameter... config) {
    shutdownInserter();
    GraphDatabaseBuilder builder = new TestGraphDatabaseFactory().newEmbeddedDatabaseBuilder(storeDir);
    for (ConfigurationParameter configurationParameter : config) {
        builder = builder.setConfig(configurationParameter.key, configurationParameter.value);
    }
    db = builder.newGraphDatabase();
}
Also used : TestGraphDatabaseFactory(org.neo4j.test.TestGraphDatabaseFactory) GraphDatabaseBuilder(org.neo4j.graphdb.factory.GraphDatabaseBuilder)

Aggregations

GraphDatabaseBuilder (org.neo4j.graphdb.factory.GraphDatabaseBuilder)21 GraphDatabaseService (org.neo4j.graphdb.GraphDatabaseService)8 TestGraphDatabaseFactory (org.neo4j.test.TestGraphDatabaseFactory)8 File (java.io.File)6 Test (org.junit.Test)6 Transaction (org.neo4j.graphdb.Transaction)5 GraphDatabaseFactory (org.neo4j.graphdb.factory.GraphDatabaseFactory)5 GraphDatabaseAPI (org.neo4j.kernel.internal.GraphDatabaseAPI)5 Edge (com.tinkerpop.blueprints.Edge)2 Vertex (com.tinkerpop.blueprints.Vertex)2 Map (java.util.Map)2 GlobalGraphOperations (org.neo4j.tooling.GlobalGraphOperations)2 InputStream (java.io.InputStream)1 HashMap (java.util.HashMap)1 ExecutorService (java.util.concurrent.ExecutorService)1 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 AtomicReference (java.util.concurrent.atomic.AtomicReference)1 BooleanSupplier (java.util.function.BooleanSupplier)1 ConsistencyCheckService (org.neo4j.consistency.ConsistencyCheckService)1 AccessStatsKeepingStoreAccess (org.neo4j.consistency.statistics.AccessStatsKeepingStoreAccess)1