Package com.thinkaurelius.titan.graphdb.configuration

Examples of com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration


    public FaunusTitanGraph(final Configuration configuration) {
        this(configuration, true);
    }

    public FaunusTitanGraph(final Configuration configuration, boolean autoTx) {
        super(new GraphDatabaseConfiguration(configuration));

        //Used to be TranscationConfig(this.getConfiguration, false) indicating that this is not threadBound
        //which is the defaul for Transaction
        this.tx = (autoTx) ? newTransaction(new StandardTransactionBuilder(this.getConfiguration(), this)) : null;
    }
View Full Code Here


        txs = null;
    }

    @Override
    public String toString() {
        GraphDatabaseConfiguration config = ((StandardTitanGraph) this).getConfiguration();
        return "titangraph" + StringFactory.L_BRACKET +
                config.getBackendDescription() + StringFactory.R_BRACKET;
//        return StringFactory.graphString(this,config.getBackendDescription());
    }
View Full Code Here

        this.config = config;
    }

    @Before
    public void setUp() throws Exception {
        GraphDatabaseConfiguration graphconfig = new GraphDatabaseConfiguration(config);
        graphconfig.getBackend().clearStorage();
        open();
    }
View Full Code Here

        return config;
    }

    @Before
    public void before() throws StorageException {
        GraphDatabaseConfiguration graphconfig = new GraphDatabaseConfiguration(getConfiguration());
        graphconfig.getBackend().clearStorage();
        features = graphconfig.getStoreFeatures();
        open(getMetricsConfiguration());
    }
View Full Code Here

     * @param configuration Configuration for the graph database
     * @return Titan graph database
     * @see <a href="https://github.com/thinkaurelius/titan/wiki/Graph-Configuration">Graph Configuration Wiki</a>
     */
    public static TitanGraph open(Configuration configuration) {
        return new StandardTitanGraph(new GraphDatabaseConfiguration(configuration));
    }
View Full Code Here

    public static final void clear(TitanGraph graph) {
        Preconditions.checkNotNull(graph);
        Preconditions.checkArgument(graph instanceof StandardTitanGraph,"Invalid graph instance detected: %s",graph.getClass());
        StandardTitanGraph g = (StandardTitanGraph)graph;
        Preconditions.checkArgument(!g.isOpen(),"Graph needs to be shut down before it can be cleared.");
        final GraphDatabaseConfiguration config = g.getConfiguration();
        BackendOperation.execute(new Callable<Boolean>(){
            @Override
            public Boolean call() throws Exception {
                config.getBackend().clearStorage();
                return true;
            }
            @Override
            public String toString() { return "ClearBackend"; }
        },config.getWriteAttempts(),config.getStorageWaittime());
    }
View Full Code Here

TOP

Related Classes of com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration

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.