org.jboss.cache.interceptors
Class OrderedSynchronizationHandler
java.lang.Object
org.jboss.cache.interceptors.OrderedSynchronizationHandler
- All Implemented Interfaces:
- Synchronization
public class OrderedSynchronizationHandler
- extends Object
- implements Synchronization
Maintains a list of Synchronization handlers. Reason is that we have to
invoke certain handlers before others. See the description in
SyncTxUnitTestCase.testConcurrentPuts(). For example, for synchronous
replication, we have to execute the ReplicationInterceptor's
afterCompletion() before the TransactionInterceptor's.
- Version:
- $Id: OrderedSynchronizationHandler.java 4382 2007-08-24 12:17:11Z manik.surtani@jboss.com $
- Author:
- Bela Ban
getInstance
public static OrderedSynchronizationHandler getInstance(Transaction tx)
throws SystemException,
RollbackException
- Creates a new instance of OrderedSynchronizationHandler, or fetches an existing instance. Key is the local
transaction (tx). This instance registers with the TransactionManager automatically
- Parameters:
tx
-
- Throws:
SystemException
RollbackException
registerAtHead
public void registerAtHead(Synchronization handler)
registerAtTail
public void registerAtTail(Synchronization handler)
beforeCompletion
public void beforeCompletion()
- Specified by:
beforeCompletion
in interface Synchronization
afterCompletion
public void afterCompletion(int status)
- Specified by:
afterCompletion
in interface Synchronization
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2007 JBoss, a division of Red Hat. All Rights Reserved.