|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An internal interface that must be provided by any implementation of the
public Transaction
interface, in order to function correctly in
the transactional editing domain framework.
Field Summary |
Fields inherited from interface org.eclipse.emf.transaction.Transaction |
OPTION_NO_NOTIFICATIONS, OPTION_NO_TRIGGERS, OPTION_NO_UNDO, OPTION_NO_VALIDATION, OPTION_UNPROTECTED |
Method Summary | |
void |
abort(org.eclipse.core.runtime.IStatus status)
Aborts the transaction with a reason given by the specified status. |
void |
add(org.eclipse.emf.common.notify.Notification notification)
Adds the specified notification to the list of notifications received during this transaction. |
void |
addTriggers(TriggerCommand triggers)
Adds a group of triggers that were executed during my commit. |
void |
endPrivileged(PrivilegedRunnable runnable)
Returns me to my previous owner, upon completion of the specified privileged runnable. |
List |
getNotifications()
Obtains the list of notifications that were received during execution of this transaction. |
InternalTransaction |
getRoot()
Obtains the root transaction (the one that has no parent). |
org.eclipse.emf.common.command.Command |
getTriggers()
Obtains the triggers that were executed during my commit. |
boolean |
isRollingBack()
Queries whether this transaction or any of its ancestors is in the process of rolling back. |
void |
pause()
Pauses me while a child transaction is active, so that I do not collect either notifications or recorded changes during that time. |
void |
resume(TransactionChangeDescription nestedChanges)
Resumes me after completion of a child transaction. |
void |
setParent(InternalTransaction parent)
Assigns my parent transaction (the one in which I am nested). |
void |
setStatus(org.eclipse.core.runtime.IStatus status)
Sets the status of the transaction. |
void |
start()
Starts me. |
void |
startPrivileged(PrivilegedRunnable runnable)
Transfers ownership of this transaction to the specified privileged runnable. |
Methods inherited from interface org.eclipse.emf.transaction.Transaction |
commit, getChangeDescription, getEditingDomain, getOptions, getOwner, getParent, getStatus, isActive, isReadOnly, rollback, yield |
Method Detail |
public InternalTransaction getRoot()
public void setParent(InternalTransaction parent)
parent
- my parent transactionpublic void start() throws InterruptedException
activate
me.
Note that this call should block the current thread until the editing domain grants exclusive access.
InterruptedException
- if the current thread is interrupted while
waiting for activationpublic void abort(org.eclipse.core.runtime.IStatus status)
status
- a status object providing the reason. It should be the status
attached to the eventual RollbackException
, and should be
set as my status
public void add(org.eclipse.emf.common.notify.Notification notification)
notification
- the notification to addInternalTransaction.getNotifications()
public List getNotifications()
InternalTransaction.add(Notification)
public void pause()
public void resume(TransactionChangeDescription nestedChanges)
nestedChanges
- the nested transaction's recorded changes, or
null
if it rolled back (in which case, I do not add
anything to my changes)public void setStatus(org.eclipse.core.runtime.IStatus status)
status
- my statuspublic boolean isRollingBack()
true
if I or my
parent
(if any) am rolling back;
false
otherwisepublic org.eclipse.emf.common.command.Command getTriggers()
null
if I have
no triggers (perhaps because the Transaction.OPTION_NO_TRIGGERS
was applied). This may be a single Command
or a
compound of multiplepublic void addTriggers(TriggerCommand triggers)
triggers
- the triggers to addpublic void startPrivileged(PrivilegedRunnable runnable)
runnable
- the runnable whose thread is to borrow mepublic void endPrivileged(PrivilegedRunnable runnable)
runnable
- the runnable whose thread had borrowed me
|
Copyright 2002, 2006 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |