org.neo4j.server.rest.transactional
Class TransactionHandle

java.lang.Object
  extended by org.neo4j.server.rest.transactional.TransactionHandle

public class TransactionHandle
extends Object

Encapsulates executing statements in a transaction, committing the transaction, or rolling it back. Constructing a TransactionHandle does not immediately ask the kernel to create a TransactionContext; instead a TransactionContext is only created when the first statements need to be executed. At the end of each statement-executing method, the TransactionContext is either suspended (ready to be resumed by a later operation), or committed, or rolled back. If you acquire instances of this class from TransactionHandleRegistry, it will prevent concurrent access to the same instance. Therefore the implementation assumes that a single instance will only be accessed from a single thread. All of the public methods on this class are "single-shot"; once you have called one method, the handle returns itself to the registry. If you want to use it again, you'll need to acquire it back from the registry to ensure exclusive use.


Constructor Summary
TransactionHandle(org.neo4j.kernel.api.KernelAPI kernel, org.neo4j.cypher.javacompat.ExecutionEngine engine, TransactionRegistry registry, TransactionUriScheme uriScheme, org.neo4j.kernel.impl.util.StringLogger log)
           
 
Method Summary
 void commit(StatementDeserializer statements, ExecutionResultSerializer output)
           
 void execute(StatementDeserializer statements, ExecutionResultSerializer output)
           
 void forceRollback()
           
 void rollback(ExecutionResultSerializer output)
           
 URI uri()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionHandle

public TransactionHandle(org.neo4j.kernel.api.KernelAPI kernel,
                         org.neo4j.cypher.javacompat.ExecutionEngine engine,
                         TransactionRegistry registry,
                         TransactionUriScheme uriScheme,
                         org.neo4j.kernel.impl.util.StringLogger log)
Method Detail

uri

public URI uri()

execute

public void execute(StatementDeserializer statements,
                    ExecutionResultSerializer output)

commit

public void commit(StatementDeserializer statements,
                   ExecutionResultSerializer output)

rollback

public void rollback(ExecutionResultSerializer output)

forceRollback

public void forceRollback()


Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.