public interface GridCacheTxSynchronization
GridCache.txSynchronize(GridCacheTxSynchronization) method.| Modifier and Type | Method and Description |
|---|---|
void |
onStateChanged(GridCacheTxState prevState,
GridCacheTxState newState,
GridCacheTx tx)
State change callback for transaction.
|
void onStateChanged(@Nullable GridCacheTxState prevState, GridCacheTxState newState, GridCacheTx tx)
GridCacheTx.setRollbackOnly() on the passed in transaction.
You can check the return value of setRollbackOnly()
method to see if transaction was indeed marked for rollback or not.prevState - Previous state of the transaction. If transaction has just been
started, then previous state is null.newState - New state of the transaction. In majority of the cases this will be the
same as tx.state(), but it is also possible
that transaction may be marked for rollback concurrently with this method
invocation, and in that case newState reflects the actual state of the
transition this callback is associated with.tx - Transaction whose state has changed.Copyright © 2014. All rights reserved.