org.eclipse.emf.cdo.transaction
Class CDOAutoAttacher
java.lang.Object
org.eclipse.emf.cdo.transaction.CDODefaultTransactionHandler
org.eclipse.emf.cdo.transaction.CDOAutoAttacher
- All Implemented Interfaces:
- CDOTransactionHandler
public class CDOAutoAttacher
- extends CDODefaultTransactionHandler
- Since:
- 2.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CDOAutoAttacher
public CDOAutoAttacher(CDOTransaction transaction)
getTransaction
public CDOTransaction getTransaction()
attachingObject
public void attachingObject(CDOTransaction transaction,
CDOObject object)
- Description copied from interface:
CDOTransactionHandler
- Called by a
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.
- Specified by:
attachingObject in interface CDOTransactionHandler- Overrides:
attachingObject in class CDODefaultTransactionHandler
modifyingObject
public void modifyingObject(CDOTransaction transaction,
CDOObject object,
CDOFeatureDelta featureChange)
- Description copied from interface:
CDOTransactionHandler
- Called by a
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.
- Specified by:
modifyingObject in interface CDOTransactionHandler- Overrides:
modifyingObject in class CDODefaultTransactionHandler
persist
protected void persist(org.eclipse.emf.ecore.EObject res,
java.lang.Object object)