public class TransactionHandle extends Object
TransactionHandle does not immediately ask the kernel to create a
KernelTransaction; instead a KernelTransaction is
only created when the first statements need to be executed.
At the end of each statement-executing method, the KernelTransaction 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 and Description |
|---|
TransactionHandle(TransitionalPeriodTransactionMessContainer txManagerFacade,
org.neo4j.cypher.javacompat.ExecutionEngine engine,
TransactionRegistry registry,
TransactionUriScheme uriScheme,
org.neo4j.kernel.impl.util.StringLogger log) |
| Modifier and Type | Method and Description |
|---|---|
void |
commit(StatementDeserializer statements,
ExecutionResultSerializer output) |
void |
execute(StatementDeserializer statements,
ExecutionResultSerializer output) |
void |
forceRollback() |
void |
rollback(ExecutionResultSerializer output) |
URI |
uri() |
public TransactionHandle(TransitionalPeriodTransactionMessContainer txManagerFacade, org.neo4j.cypher.javacompat.ExecutionEngine engine, TransactionRegistry registry, TransactionUriScheme uriScheme, org.neo4j.kernel.impl.util.StringLogger log)
public URI uri()
public void execute(StatementDeserializer statements, ExecutionResultSerializer output)
public void commit(StatementDeserializer statements, ExecutionResultSerializer output)
public void rollback(ExecutionResultSerializer output)
public void forceRollback()
throws org.neo4j.kernel.api.exceptions.TransactionFailureException
org.neo4j.kernel.api.exceptions.TransactionFailureExceptionCopyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.