public class TransactionHandle extends Object implements TransactionTerminationHandle
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.kernel.impl.query.QueryExecutionEngine engine,
TransactionRegistry registry,
TransactionUriScheme uriScheme,
org.neo4j.logging.LogProvider logProvider,
QuerySessionProvider sessionFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
commit(StatementDeserializer statements,
ExecutionResultSerializer output,
boolean pristine,
javax.servlet.http.HttpServletRequest request) |
void |
execute(StatementDeserializer statements,
ExecutionResultSerializer output,
javax.servlet.http.HttpServletRequest request) |
void |
forceRollback() |
void |
rollback(ExecutionResultSerializer output) |
boolean |
terminate() |
URI |
uri() |
public TransactionHandle(TransitionalPeriodTransactionMessContainer txManagerFacade, org.neo4j.kernel.impl.query.QueryExecutionEngine engine, TransactionRegistry registry, TransactionUriScheme uriScheme, org.neo4j.logging.LogProvider logProvider, QuerySessionProvider sessionFactory)
public URI uri()
public void execute(StatementDeserializer statements, ExecutionResultSerializer output, javax.servlet.http.HttpServletRequest request)
public boolean terminate()
terminate in interface TransactionTerminationHandlepublic void commit(StatementDeserializer statements, ExecutionResultSerializer output, boolean pristine, javax.servlet.http.HttpServletRequest request)
public void rollback(ExecutionResultSerializer output)
public void forceRollback()
throws org.neo4j.kernel.api.exceptions.TransactionFailureException
org.neo4j.kernel.api.exceptions.TransactionFailureExceptionCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.