public interface TransactionListener extends CacheCallback
A listener that can be implemented to handle transaction related
events. The methods on TransactionListener
are
invoked synchronously after the operation, commit or rollback,
completes. The transaction that causes the listener to be called
will no longer exist at the time the listener code executes. The
thread that performed the transaction operation will not see that
operation complete until the listener method completes its
execution.
Multiple transactions, on the same cache, can cause concurrent
invocation of TransactionListener
methods. Any
exceptions thrown by the listener are caught and logged.
Rollback and failed commit operations are local.
CacheTransactionManager.setListener(org.apache.geode.cache.TransactionListener)
,
CacheTransactionManager.getListener()
Modifier and Type | Method and Description |
---|---|
void |
afterCommit(TransactionEvent event)
Called after a successful commit of a transaction.
|
void |
afterFailedCommit(TransactionEvent event)
Called after an unsuccessful commit operation.
|
void |
afterRollback(TransactionEvent event)
Called after an explicit rollback of a transaction.
|
close
void afterCommit(TransactionEvent event)
event
- the TransactionEventCacheTransactionManager.commit()
void afterFailedCommit(TransactionEvent event)
event
- the TransactionEventCacheTransactionManager.commit()
void afterRollback(TransactionEvent event)
event
- the TransactionEventCacheTransactionManager.rollback()
,
CacheTransactionManager.commit()