public interface TransactionContext
statements
created from this transaction context. Changes made within a transaction
are visible to all operations within it.
The reason for the separation between transactions and statements is isolation levels. While Neo4j is read-committed
isolation, a read can potentially involve multiple operations (think of a cypher statement). Within that read, or
statement if you will, the isolation level should be repeatable read, not read committed.
Clearly separating between the concept of a transaction and the concept of a statement allows us to cater to this
type of isolation requirements.Modifier and Type | Method and Description |
---|---|
void |
commit()
Commit this transaction, this will make the changes in this context visible to other
transactions.
|
StatementContext |
newStatementContext()
Creates a new
statement which operations can be performed on. |
void |
prepare()
Writes the changes this transaction wants to perform down to disk.
|
void |
rollback()
Roll back this transaction, undoing any changes that have been made.
|
StatementContext newStatementContext()
StatementContext
to do operations on.void prepare()
commit()
, but
it is a necessary thing if you are implementing two-phase commits.void commit() throws TransactionFailureException
prepare()
before calling this method, the transaction
is implicitly prepared.TransactionFailureException
void rollback() throws TransactionFailureException
TransactionFailureException
Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.