| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface InternalTransactionalEditingDomain
Internal interface that must be provided by any implementation of the public
 TransactionalEditingDomain API, in order to function correctly in the transactional
 editing domain framework.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from interface org.eclipse.emf.transaction.TransactionalEditingDomain | 
|---|
| TransactionalEditingDomain.DefaultOptions, TransactionalEditingDomain.Factory, TransactionalEditingDomain.Registry | 
| Method Summary | |
|---|---|
|  void | activate(InternalTransaction tx)Activates (starts) the specified transaction. | 
|  void | broadcastUnbatched(Notification notification)Broadcasts the specified notification to listeners as a singleton list, in a situation where batching is not possible because events are occurring outside of any transaction context. | 
|  void | deactivate(InternalTransaction tx)Deactivates the specified transaction. | 
|  void | endPrivileged(PrivilegedRunnable<?> runnable)Returns me to my previous owner, upon completion of the specified privileged runnable. | 
|  InternalTransaction | getActiveTransaction()Obtains the transaction that currently has access to me, and whose thread of execution is active. | 
|  TransactionChangeRecorder | getChangeRecorder()Obtains the change recorder that I use to track changes in my resource set. | 
|  Map<Object,Object> | getUndoRedoOptions()Retrieves the undo/redo options that should be used when creating transactions. | 
|  TransactionValidator | getValidator()Gets the validator that transactions should use to validate themselves upon committing. | 
|  void | precommit(InternalTransaction tx)Performs the pre-commit notifications and processing of trigger comamnds. | 
|  void | startPrivileged(PrivilegedRunnable<?> runnable)Transfers ownership of this editing domain to the specified privileged runnable. | 
|  InternalTransaction | startTransaction(boolean readOnly,
                 Map<?,?> options)Creates and starts a new transaction. | 
| Methods inherited from interface org.eclipse.emf.transaction.TransactionalEditingDomain | 
|---|
| addResourceSetListener, createPrivilegedRunnable, dispose, getID, removeResourceSetListener, runExclusive, setID, yield | 
| Methods inherited from interface org.eclipse.emf.edit.domain.EditingDomain | 
|---|
| createCommand, createOverrideCommand, createResource, getChildren, getClipboard, getCommandStack, getNewChildDescriptors, getOptimizeCopy, getParent, getResourceSet, getRoot, getTreePath, isControllable, isReadOnly, loadResource, setClipboard, treeIterator | 
| Method Detail | 
|---|
InternalTransaction startTransaction(boolean readOnly,
                                     Map<?,?> options)
                                     throws InterruptedException
readOnly - true if the transaction is intended only
     to read the resource set; false if it will modify itoptions - the options to apply to the transaction (as specified by
     the TransactionalCommandStack interface
InterruptedException - if the current thread is interrupted while
     waiting for the transaction to start
IllegalArgumentException - if the current thread does not
     own the transaction that it wants
     to start or if it is attempting to start a transaction in an
     inappropriate contextactivate(InternalTransaction)InternalTransaction getActiveTransaction()
null if no transaction
     is currently active
void activate(InternalTransaction tx)
              throws InterruptedException
Note that only the thread that owns a transaction may activate it. Also, a nested read-write transaction cannot be activated if its parent transaction is read-only, unless the read-write transaction has the 'unprotected' option.
tx - the transaction to activate
InterruptedException - if the current thread is interrupted while
     waiting for me to activate its transaction
IllegalArgumentException - if the current thread does not
     own the transaction that it wants
     to activate or if it is attempting to activate a transaction in an
     inappropriate contextgetActiveTransaction(), 
TransactionalEditingDomain.yield(), 
startTransaction(boolean, Map), 
deactivate(InternalTransaction)
void precommit(InternalTransaction tx)
               throws RollbackException
tx - the transaction that is being committed
RollbackException - if any of the pre-commit listeners forces
     rollback of the transaction.  The caller must honour this rollback
     request by actually rolling back
     the transactionTransaction.commit(), 
Transaction.rollback(), 
ResourceSetListener.transactionAboutToCommit(org.eclipse.emf.transaction.ResourceSetChangeEvent)void deactivate(InternalTransaction tx)
active transaction.
 The current thread must own the transaction that it is attempting to deactivate and this transaction must currently be my active transaction.
Note that a transaction must ensure that this method is called when it closes, either by commit or by rollback, and at most once.
tx - the transaction to deactivate
IllegalArgumentException - if either the transaction is not the
     active transaction, or the current thread does not own itactivate(InternalTransaction), 
Transaction.commit(), 
Transaction.rollback()TransactionChangeRecorder getChangeRecorder()
TransactionValidator getValidator()
void broadcastUnbatched(Notification notification)
notification - the notification to send to resource set listenersNotificationFilter.READ, 
ResourceSetListener, 
FilterManager.selectUnbatched(java.util.List, NotificationFilter)Map<Object,Object> getUndoRedoOptions()
void 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 | |||||||||