org.eclipse.emf.cdo.transaction
Class CDOAsyncTransactionHandler

java.lang.Object
  extended by org.eclipse.emf.cdo.transaction.CDOAsyncTransactionHandler
All Implemented Interfaces:
CDOTransactionHandler, CDOTransactionHandler1, CDOTransactionHandler2, CDOTransactionHandlerBase

public class CDOAsyncTransactionHandler
extends Object
implements CDOTransactionHandler

Asynchronously executes a delegate handler's pre-event methods. The delegate handler's code may access the view without causing deadlocks.

Since:
2.0

Constructor Summary
CDOAsyncTransactionHandler(CDOTransactionHandler delegate)
           
 
Method Summary
 void attachingObject(CDOTransaction transaction, CDOObject object)
          Asynchronously executes the delegate handler's attachingObject() method.
 void committedTransaction(CDOTransaction transaction, CDOCommitContext commitContext)
          Synchronously executes the delegate handler's committedTransaction() method.
 void committingTransaction(CDOTransaction transaction, CDOCommitContext commitContext)
          Asynchronously executes the delegate handler's committingTransaction() method.
 void detachingObject(CDOTransaction transaction, CDOObject object)
          Asynchronously executes the delegate handler's detachingObject() method.
 void modifyingObject(CDOTransaction transaction, CDOObject object, CDOFeatureDelta featureChange)
          Asynchronously executes the delegate handler's modifyingObject() method.
 void rolledBackTransaction(CDOTransaction transaction)
          Synchronously executes the delegate handler's rolledBackTransaction() method.
protected  void runAsync(Runnable runnable)
          Should be overridden if you want to use different threading mechanism.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CDOAsyncTransactionHandler

public CDOAsyncTransactionHandler(CDOTransactionHandler delegate)
Method Detail

attachingObject

public final void attachingObject(CDOTransaction transaction,
                                  CDOObject object)
Asynchronously executes the delegate handler's attachingObject() method.

Specified by:
attachingObject in interface CDOTransactionHandler1

detachingObject

public final void detachingObject(CDOTransaction transaction,
                                  CDOObject object)
Asynchronously executes the delegate handler's detachingObject() method.

Specified by:
detachingObject in interface CDOTransactionHandler1

modifyingObject

public final void modifyingObject(CDOTransaction transaction,
                                  CDOObject object,
                                  CDOFeatureDelta featureChange)
Asynchronously executes the delegate handler's modifyingObject() method.

Specified by:
modifyingObject in interface CDOTransactionHandler1

committingTransaction

public void committingTransaction(CDOTransaction transaction,
                                  CDOCommitContext commitContext)
Asynchronously executes the delegate handler's committingTransaction() method.

Specified by:
committingTransaction in interface CDOTransactionHandler2

committedTransaction

public void committedTransaction(CDOTransaction transaction,
                                 CDOCommitContext commitContext)
Synchronously executes the delegate handler's committedTransaction() method.

Specified by:
committedTransaction in interface CDOTransactionHandler2

rolledBackTransaction

public void rolledBackTransaction(CDOTransaction transaction)
Synchronously executes the delegate handler's rolledBackTransaction() method.

Specified by:
rolledBackTransaction in interface CDOTransactionHandler2

runAsync

protected void runAsync(Runnable runnable)
Should be overridden if you want to use different threading mechanism.



Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.