Package org.apache.geode.cache.util
Class TransactionListenerAdapter
java.lang.Object
org.apache.geode.cache.util.TransactionListenerAdapter
- All Implemented Interfaces:
CacheCallback,Declarable,TransactionListener
Utility class that implements all methods in
TransactionListener with empty
implementations. Applications can subclass this class and only override the methods for the
events of interest.- Since:
- GemFire 5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterCommit(TransactionEvent event) Called after a successful commit of a transaction.voidCalled after an unsuccessful commit operation.voidafterRollback(TransactionEvent event) Called after an explicit rollback of a transaction.voidclose()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 anAttributesMutator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.geode.cache.Declarable
init, initialize
-
Constructor Details
-
TransactionListenerAdapter
public TransactionListenerAdapter()
-
-
Method Details
-
afterCommit
Description copied from interface:TransactionListenerCalled after a successful commit of a transaction.- Specified by:
afterCommitin interfaceTransactionListener- Parameters:
event- the TransactionEvent- See Also:
-
afterFailedCommit
Description copied from interface:TransactionListenerCalled after an unsuccessful commit operation.- Specified by:
afterFailedCommitin interfaceTransactionListener- Parameters:
event- the TransactionEvent- See Also:
-
afterRollback
Description copied from interface:TransactionListenerCalled after an explicit rollback of a transaction.- Specified by:
afterRollbackin interfaceTransactionListener- Parameters:
event- the TransactionEvent- See Also:
-
close
public void close()Description copied from interface:CacheCallbackCalled 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 anAttributesMutator.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.
- Specified by:
closein interfaceCacheCallback- See Also:
-