T - the type of object communicated from a successful
beforeCommit(TransactionData) to afterCommit(TransactionData, Object).public static class TransactionEventHandler.Adapter<T> extends Object implements TransactionEventHandler<T>
TransactionEventHandlerTransactionEventHandler.Adapter<T>| Constructor and Description |
|---|
TransactionEventHandler.Adapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterCommit(TransactionData data,
T state)
Invoked after the transaction has been committed successfully.
|
void |
afterRollback(TransactionData data,
T state)
Invoked after the transaction has been rolled back if committing the
transaction failed for some reason.
|
T |
beforeCommit(TransactionData data)
Invoked when a transaction is about to be committed.
|
public T beforeCommit(TransactionData data) throws Exception
TransactionEventHandlerTransactionFailureException will be thrown from
Transaction.close().
The transaction is still open when this method is invoked, making it
possible to perform mutating operations in this method. This is however
highly discouraged. Changes made in this method are not guaranteed to be
visible by this or other TransactionEventHandlers.beforeCommit in interface TransactionEventHandler<T>data - the changes that will be committed in this transaction.null) that will be passed on to
TransactionEventHandler.afterCommit(TransactionData, Object) or
TransactionEventHandler.afterRollback(TransactionData, Object) of this object.Exception - to indicate that the transaction should be rolled back.public void afterCommit(TransactionData data, T state)
TransactionEventHandlerafterCommit in interface TransactionEventHandler<T>data - the changes that were committed in this transaction.state - the object returned by
TransactionEventHandler.beforeCommit(TransactionData).public void afterRollback(TransactionData data, T state)
TransactionEventHandlerafterRollback in interface TransactionEventHandler<T>data - the changes that were committed in this transaction.state - the object returned by
TransactionEventHandler.beforeCommit(TransactionData).Copyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.