|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Untamed:
Method Summary | |
boolean |
isDone()
Enabled: If not isDone(), both resolveRace(java.lang.Object) and smash(java.lang.Throwable) will
work and return true, and resolve(java.lang.Object) will work rather than
throw an exception. |
void |
resolve(Object target)
Enabled: Like resolveRace(java.lang.Object) , but throws an exception to report that
this Resolver was already resolved, rather than returning a boolean. |
boolean |
resolveRace(Object target)
Enabled: Queues all accumulated and future messages for delivery to target, and, for example, a local promise becomes resolved into being E-equivalent to the target. |
boolean |
smash(Throwable problem)
Enabled: Breaks the promise, reporting 'problem' as the reason. |
Method Detail |
public boolean resolveRace(Object target)
If this resolver already isDone()
, resolveRace(..) has no
effect and returns false. Otherwise, the promise (or whatever) becomes
resolved, this Resolver becomes done, and resolveRace(..) returns true.
In either case, a Resolver will be isDone() following a resolveRace(..).
target
-
public void resolve(Object target)
resolveRace(java.lang.Object)
, but throws an exception to report that
this Resolver was already resolved, rather than returning a boolean.
Successful return indicates successful reslution.
target
- public boolean smash(Throwable problem)
"r.smash(p)" is equivalent to "r.resolveRace(Ref.broken(p))".
resolveRace(java.lang.Object)
public boolean isDone()
resolveRace(java.lang.Object)
and smash(java.lang.Throwable)
will
work and return true, and resolve(java.lang.Object)
will work rather than
throw an exception.
If isDone(), neither none of those will work. Once a Resolver is done, it is done forever.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |