GemFire 6.6.1

com.gemstone.gemfire.cache
Interface TransactionListener

All Superinterfaces:
CacheCallback
All Known Implementing Classes:
TransactionListenerAdapter

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.

Since:
4.0
See Also:
CacheTransactionManager.setListener(com.gemstone.gemfire.cache.TransactionListener), CacheTransactionManager.getListener()

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.
 
Methods inherited from interface com.gemstone.gemfire.cache.CacheCallback
close
 

Method Detail

afterCommit

void afterCommit(TransactionEvent event)
Called after a successful commit of a transaction.

Parameters:
event - the TransactionEvent
See Also:
CacheTransactionManager.commit()

afterFailedCommit

void afterFailedCommit(TransactionEvent event)
Called after an unsuccessful commit operation.

Parameters:
event - the TransactionEvent
See Also:
CacheTransactionManager.commit()

afterRollback

void afterRollback(TransactionEvent event)
Called after an explicit rollback of a transaction.

Parameters:
event - the TransactionEvent
See Also:
CacheTransactionManager.rollback(), CacheTransactionManager.commit()

GemFire 6.6.1

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