Search in sources :

Example 21 with StandardTitanTx

use of com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx in project titan by thinkaurelius.

the class StandardTitanGraph method newTransaction.

public StandardTitanTx newTransaction(TransactionConfiguration configuration) {
    if (!isOpen)
        ExceptionFactory.graphShutdown();
    try {
        IndexSerializer.IndexInfoRetriever retriever = indexSerializer.getIndexInforRetriever();
        StandardTitanTx tx = new StandardTitanTx(this, configuration, backend.beginTransaction(configuration, retriever));
        retriever.setTransaction(tx);
        return tx;
    } catch (StorageException e) {
        throw new TitanException("Could not start new transaction", e);
    }
}
Also used : StandardTitanTx(com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx) StorageException(com.thinkaurelius.titan.diskstorage.StorageException)

Aggregations

StandardTitanTx (com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx)21 Test (org.junit.Test)5 RelationType (com.thinkaurelius.titan.core.RelationType)3 TitanVertex (com.thinkaurelius.titan.core.TitanVertex)3 WriteConfiguration (com.thinkaurelius.titan.diskstorage.configuration.WriteConfiguration)3 InternalRelationType (com.thinkaurelius.titan.graphdb.internal.InternalRelationType)3 IOException (java.io.IOException)2 Map (java.util.Map)2 ExecutionException (java.util.concurrent.ExecutionException)2 Direction (org.apache.tinkerpop.gremlin.structure.Direction)2 TitanEdge (com.thinkaurelius.titan.core.TitanEdge)1 TitanElement (com.thinkaurelius.titan.core.TitanElement)1 TitanException (com.thinkaurelius.titan.core.TitanException)1 TitanGraph (com.thinkaurelius.titan.core.TitanGraph)1 TitanRelation (com.thinkaurelius.titan.core.TitanRelation)1 TitanTransaction (com.thinkaurelius.titan.core.TitanTransaction)1 TitanVertexProperty (com.thinkaurelius.titan.core.TitanVertexProperty)1 EntryList (com.thinkaurelius.titan.diskstorage.EntryList)1 StorageException (com.thinkaurelius.titan.diskstorage.StorageException)1 ModifiableConfiguration (com.thinkaurelius.titan.diskstorage.configuration.ModifiableConfiguration)1