|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
A convenient partial implementation of the RunnableWithResult
interface that implements a settable result
field and commit status. |
Method Summary | |
---|---|
java.lang.Object |
getResult()
Returns a result computed by my Runnable.run() method. |
org.eclipse.core.runtime.IStatus |
getStatus()
Queries my commit status. |
void |
setStatus(org.eclipse.core.runtime.IStatus status)
Sets the commit status after completion of the Runnable.run() method. |
Methods inherited from interface java.lang.Runnable |
---|
run |
Method Detail |
public java.lang.Object getResult()
Runnable.run()
method.
null
if nonepublic void setStatus(org.eclipse.core.runtime.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)public org.eclipse.core.runtime.IStatus getStatus()
RunnableWithResult.setStatus(IStatus)
method)
|
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 |