|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InternalTransaction
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_IS_UNDO_REDO_TRANSACTION, OPTION_NO_NOTIFICATIONS, OPTION_NO_TRIGGERS, OPTION_NO_UNDO, OPTION_NO_VALIDATION, OPTION_UNPROTECTED, OPTION_VALIDATE_EDIT, OPTION_VALIDATE_EDIT_CONTEXT |
Method Summary | |
---|---|
void |
abort(IStatus status)
Aborts the transaction with a reason given by the specified status. |
void |
add(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<Notification> |
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). |
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(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 |
---|
InternalTransaction getRoot()
void setParent(InternalTransaction parent)
parent
- my parent transactionvoid 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 activationvoid abort(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
void add(Notification notification)
notification
- the notification to addgetNotifications()
List<Notification> getNotifications()
add(Notification)
void pause()
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)void setStatus(IStatus status)
status
- my statusboolean isRollingBack()
true
if I or my
parent
(if any) am rolling back;
false
otherwiseCommand 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 multiplevoid addTriggers(TriggerCommand triggers)
triggers
- the triggers to addvoid startPrivileged(PrivilegedRunnable<?> runnable)
runnable
- the runnable whose thread is to borrow mevoid endPrivileged(PrivilegedRunnable<?> runnable)
runnable
- the runnable whose thread had borrowed me
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |