| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - the result type of the runnablepublic interface RunnableWithResult<T>
Extends the core Java Runnable interface with the ability to return
 a result.  Useful for returning results of read operations from the
 TransactionalEditingDomain.runExclusive(Runnable) method.
 
Also, because read transactions can roll back on commit if, for example, some other thread performs a concurrent write that corrupts the data being read, this interface also provides a means to set a status to indicate success or failure of the transaction.
TransactionalEditingDomain.runExclusive(Runnable)| Nested Class Summary | |
|---|---|
| static class | RunnableWithResult.Impl<T>A convenient partial implementation of the RunnableWithResultinterface that implements a settableresultfield and commit status. | 
| Method Summary | |
|---|---|
|  T | getResult()Returns a result computed by my Runnable.run()method. | 
|  IStatus | getStatus()Queries my commit status. | 
|  void | setStatus(IStatus status)Sets the commit status after completion of the Runnable.run()method. | 
| Methods inherited from interface java.lang.Runnable | 
|---|
| run | 
| Method Detail | 
|---|
T getResult()
Runnable.run() method.
null if nonevoid setStatus(IStatus status)
Runnable.run() method.
status - an OK status if commit succeeds, or an error status
     if it fails (in which case the transaction rolled back and the status
     provides details in human-readable form)IStatus getStatus()
setStatus(IStatus) method)| 
 | 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 | |||||||||