|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.cdo.transaction.CDOPostEventTransactionHandler
An abstract call-back class that is called by a transcation
after objects
have been
attached, modified or detached.
CDOTransactionHandler1
Nested Class Summary | |
---|---|
static class |
CDOPostEventTransactionHandler.Default
An empty default implementation of CDOPostEventTransactionHandler . |
Constructor Summary | |
---|---|
CDOPostEventTransactionHandler()
|
Method Summary | |
---|---|
protected abstract void |
attachedObject(CDOTransaction transaction,
CDOObject object,
Notification msg)
|
void |
attachingObject(CDOTransaction transaction,
CDOObject object)
Called by a CDOTransaction before an object is added. |
void |
committedTransaction(CDOTransaction transaction,
CDOCommitContext commitContext)
Called by a CDOTransaction after it is being committed. |
void |
committingTransaction(CDOTransaction transaction,
CDOCommitContext commitContext)
Called by a CDOTransaction before it is being committed. |
protected abstract void |
detachedObject(CDOTransaction transaction,
CDOObject object,
Notification msg)
|
void |
detachingObject(CDOTransaction transaction,
CDOObject object)
Called by a CDOTransaction before an object is detached. |
protected abstract void |
modifiedObject(CDOTransaction transaction,
CDOObject object,
Notification msg)
|
void |
modifyingObject(CDOTransaction transaction,
CDOObject object,
CDOFeatureDelta featureDelta)
Called by a CDOTransaction before an object is modified. |
void |
rolledBackTransaction(CDOTransaction transaction)
Called by a CDOTransaction after it is rolled back. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CDOPostEventTransactionHandler()
Method Detail |
---|
public void attachingObject(CDOTransaction transaction, CDOObject object)
CDOTransactionHandler1
CDOTransaction
before an object is added. The implementor of this method is allowed
to throw an unchecked exception that will propagate up to the operation that is about to add the object (thereby
preventing the operation from successful completion).
Note: Implementors must not start threads which access the view
and wait for their
completion since deadlocks can result. The following example causes a deadlock:
getDisplay().syncExec(new Runnable() { public void run() { try { cdoObject.getName(); } catch (Exception ignore) { } } });If you need to synchronously execute threads which access the
view
you should use
CDOAsyncTransactionHandler
.
attachingObject
in interface CDOTransactionHandler1
public void modifyingObject(CDOTransaction transaction, CDOObject object, CDOFeatureDelta featureDelta)
CDOTransactionHandler1
CDOTransaction
before an object is modified. The implementor of this method is
allowed to throw an unchecked exception that will propagate up to the operation that is about to modify the object
(thereby preventing the operation from completing successfully).
Note: Implementors must not start threads which access the view
and wait for their
completion since deadlocks can result. The following example causes a deadlock:
getDisplay().syncExec(new Runnable() { public void run() { try { cdoObject.getName(); } catch (Exception ignore) { } } });If you need to synchronously execute threads which access the
view
you should use
CDOAsyncTransactionHandler
.
modifyingObject
in interface CDOTransactionHandler1
public void detachingObject(CDOTransaction transaction, CDOObject object)
CDOTransactionHandler1
CDOTransaction
before an object is detached. The implementor of this method is
allowed to throw an unchecked exception that will propagate up to the operation that is about to remove the object
(thereby preventing the operation from completing successfully).
Note: Implementors must not start threads which access the view
and wait for their
completion since deadlocks can result. The following example causes a deadlock:
getDisplay().syncExec(new Runnable() { public void run() { try { cdoObject.getName(); } catch (Exception ignore) { } } });If you need to synchronously execute threads which access the
view
you should use
CDOAsyncTransactionHandler
.
detachingObject
in interface CDOTransactionHandler1
public void committingTransaction(CDOTransaction transaction, CDOCommitContext commitContext)
CDOTransactionHandler2
CDOTransaction
before it is being committed. The implementor of this method is
allowed to throw an unchecked exception that will propagate up to the operation that is about to commit the
transaction (thereby preventing the operation from completing successfully). The implementor of this method is
allowed to apply changes to the object graph managed by the transaction.
committingTransaction
in interface CDOTransactionHandler2
public void committedTransaction(CDOTransaction transaction, CDOCommitContext commitContext)
CDOTransactionHandler2
CDOTransaction
after it is being committed. The implementor of this method is
not allowed to throw an unchecked exception.
If you're interested in the results of the commit operation consider to implement
CDOTransactionHandler3.committedTransaction()
.
committedTransaction
in interface CDOTransactionHandler2
public void rolledBackTransaction(CDOTransaction transaction)
CDOTransactionHandler2
CDOTransaction
after it is rolled back. If the implementor of this method throws an
exception it will be logged as an error and subsequent handlers will be further called.
rolledBackTransaction
in interface CDOTransactionHandler2
protected abstract void attachedObject(CDOTransaction transaction, CDOObject object, Notification msg)
protected abstract void modifiedObject(CDOTransaction transaction, CDOObject object, Notification msg)
protected abstract void detachedObject(CDOTransaction transaction, CDOObject object, Notification msg)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |