Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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,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()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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