GemFire 6.6.3

com.gemstone.gemfire.cache.util
Class TransactionListenerAdapter

java.lang.Object
  extended by com.gemstone.gemfire.cache.util.TransactionListenerAdapter
All Implemented Interfaces:
CacheCallback, TransactionListener

public abstract class TransactionListenerAdapter
extends Object
implements 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:
5.0

Constructor Summary
TransactionListenerAdapter()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionListenerAdapter

public TransactionListenerAdapter()
Method Detail

afterCommit

public void afterCommit(TransactionEvent event)
Description copied from interface: TransactionListener
Called after a successful commit of a transaction.

Specified by:
afterCommit in interface TransactionListener
Parameters:
event - the TransactionEvent
See Also:
CacheTransactionManager.commit()

afterFailedCommit

public void afterFailedCommit(TransactionEvent event)
Description copied from interface: TransactionListener
Called after an unsuccessful commit operation.

Specified by:
afterFailedCommit in interface TransactionListener
Parameters:
event - the TransactionEvent
See Also:
CacheTransactionManager.commit()

afterRollback

public void afterRollback(TransactionEvent event)
Description copied from interface: TransactionListener
Called after an explicit rollback of a transaction.

Specified by:
afterRollback in interface TransactionListener
Parameters:
event - the TransactionEvent
See Also:
CacheTransactionManager.rollback(), CacheTransactionManager.commit()

close

public void close()
Description copied from interface: CacheCallback
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.

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:
close in interface CacheCallback
See Also:
RegionService.close(), Region.close(), Region.localDestroyRegion(), Region.destroyRegion(), AttributesMutator

GemFire 6.6.3

Copyright © 1997-2012 VMware, Inc. All rights reserved.