|
Luigi Homepage | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.cw.luigi.commands.LateResultImpl
net.cw.luigi.commands.WaitableResult
public class WaitableResult
LateResult implementation that uses a Latch to allow client threads to wait until the worker thread
is done. Note that waiting is done only throught the getOrThrow method, and instances
of this class can still be used in polling techniques around the isReady() method.
Latch,
Serialized Form| Constructor Summary | |
|---|---|
WaitableResult()
Constructor for the WaitableResult object |
|
| Method Summary | |
|---|---|
Object |
getOrThrow()
acquires from the latch and calls getOrThrow in the superclass. |
void |
setError(Throwable error)
Sets the error and releases the latch |
void |
setValue(Object value)
Sets the value and releases the latch |
| Methods inherited from class net.cw.luigi.commands.LateResultImpl |
|---|
getError, getValue, isError, isReady, isValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WaitableResult()
| Method Detail |
|---|
public Object getOrThrow()
throws Throwable
getOrThrow in interface LateResultgetOrThrow in class LateResultImplThrowable - TODO: Description of the Exceptionpublic void setValue(Object value)
setValue in interface LateResultsetValue in class LateResultImplvalue - The new valuepublic void setError(Throwable error)
setError in interface LateResultsetError in class LateResultImplerror - The new error
|
Luigi Homepage | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||