站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 Cache API Documentation 英文版文档

OrderedSynchronizationHandler (JBossCache API) - JBoss 4.0.1 sp1 Cache API Documentation 英文版文档


org.jboss.cache.interceptors
Class OrderedSynchronizationHandler

java.lang.Object
  extended byorg.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,v 1.2 2004/08/14 17:27:13 belaban Exp $
Author:
Bela Ban

Method Summary
 void afterCompletion(int status)
           
 void beforeCompletion()
           
static OrderedSynchronizationHandler getInstance(Transaction tx)
          Creates a new instance of OrderedSynchronizationHandler, or fetches an existing instance.
 void registerAtHead(Synchronization handler)
           
 void registerAtTail(Synchronization handler)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

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 -
Returns:
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()


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.