Package org.neo4j.graphdb.factory

Examples of org.neo4j.graphdb.factory.HighlyAvailableGraphDatabaseFactory


            final String directory = this.configuration.getString(CONFIG_DIRECTORY);
            final Map neo4jSpecificConfig = ConfigurationConverter.getMap(this.configuration.subset(CONFIG_CONF));
            final boolean ha = this.configuration.getBoolean(CONFIG_HA, false);
            // if HA is enabled then use the correct factory to instantiate the GraphDatabaseService
            this.baseGraph = ha ?
                    new HighlyAvailableGraphDatabaseFactory().newHighlyAvailableDatabaseBuilder(directory).setConfig(neo4jSpecificConfig).newGraphDatabase() :
                    new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(directory).
                            setConfig(neo4jSpecificConfig).newGraphDatabase();
            this.transactionManager = ((GraphDatabaseAPI) this.baseGraph).getDependencyResolver().resolveDependency(TransactionManager.class);
            this.cypher = new ExecutionEngine(this.baseGraph);
            this.neo4jGraphVariables = new Neo4jGraphVariables(this);
View Full Code Here


* @author Stephen Mallette
*/
public class Neo4jHaGraph extends Neo4jGraph {

    public Neo4jHaGraph(final String directory) {
        super(new HighlyAvailableGraphDatabaseFactory().newHighlyAvailableDatabase(directory));
    }
View Full Code Here

    public Neo4jHaGraph(final String directory) {
        super(new HighlyAvailableGraphDatabaseFactory().newHighlyAvailableDatabase(directory));
    }

    public Neo4jHaGraph(final String directory, final Map<String, String> configuration) {
        super(new HighlyAvailableGraphDatabaseFactory().newHighlyAvailableDatabaseBuilder(directory).setConfig(configuration).newGraphDatabase());
    }
View Full Code Here

* @author Stephen Mallette
*/
public class Neo4j2HaGraph extends Neo4j2Graph {

    public Neo4j2HaGraph(final String directory) {
        super(new HighlyAvailableGraphDatabaseFactory().newHighlyAvailableDatabase(directory));
    }
View Full Code Here

    public Neo4j2HaGraph(final String directory) {
        super(new HighlyAvailableGraphDatabaseFactory().newHighlyAvailableDatabase(directory));
    }

    public Neo4j2HaGraph(final String directory, final Map<String, String> configuration) {
        super(new HighlyAvailableGraphDatabaseFactory().newHighlyAvailableDatabaseBuilder(directory).setConfig(configuration).newGraphDatabase());
    }
View Full Code Here

        .newGraphDatabase();
    this.installShutdownHook(graphDb);
    return graphDb;
  }
  public GraphDatabaseService connectHA(String dir, Map<String, String> haConfig) {
    GraphDatabaseService graphDb = new HighlyAvailableGraphDatabaseFactory()
        .newHighlyAvailableDatabaseBuilder(dir)
        .setConfig(haConfig)
        .newGraphDatabase();
    this.installShutdownHook(graphDb);
    return graphDb;
View Full Code Here

TOP

Related Classes of org.neo4j.graphdb.factory.HighlyAvailableGraphDatabaseFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.