public abstract class TransactionListenerAdapter extends Object implements TransactionListener
TransactionListener
with empty
implementations. Applications can subclass this class and only override the methods for the
events of interest.Constructor and Description |
---|
TransactionListenerAdapter() |
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.
|
void |
close()
Called when the region containing this callback is closed or destroyed, when the cache is
closed, or when a callback is removed from a region using an
AttributesMutator . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init, initialize
public void afterCommit(TransactionEvent event)
TransactionListener
afterCommit
in interface TransactionListener
event
- the TransactionEventCacheTransactionManager.commit()
public void afterFailedCommit(TransactionEvent event)
TransactionListener
afterFailedCommit
in interface TransactionListener
event
- the TransactionEventCacheTransactionManager.commit()
public void afterRollback(TransactionEvent event)
TransactionListener
afterRollback
in interface TransactionListener
event
- the TransactionEventCacheTransactionManager.rollback()
,
CacheTransactionManager.commit()
public void close()
CacheCallback
AttributesMutator
.
Implementations should cleanup any external resources such as database connections. Any runtime exceptions this method throws will be logged.
It is possible for this method to be called multiple times on a single callback instance, so implementations must be tolerant of this.
close
in interface CacheCallback
RegionService.close()
,
Region.close()
,
Region.localDestroyRegion()
,
Region.destroyRegion()
,
AttributesMutator