|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.emory.mathcs.rmix.spi.CompletedRmixFuture
| Method Summary | |
boolean |
cancel(boolean mayInterruptIfRunning)
Always returns false. |
static Rmix.Future |
completed(java.lang.Object result)
Creates a successfully completed future with specified result. |
static Rmix.Future |
completed(java.lang.Object result,
Callback cb)
Creates a successfully completed future with specified result and completion callback. |
static Rmix.Future |
failed(java.lang.Throwable cause)
Creates a failed future with specified failure cause. |
static Rmix.Future |
failed(java.lang.Throwable cause,
Callback cb)
Creates a failed future with specified failure cause and completion callback. |
java.lang.Object |
get()
Waits if necessary for the computation to complete, and then retrieves its result. |
java.lang.Object |
get(long timeout,
TimeUnit granularity)
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available. |
boolean |
isCancelled()
Always returns false. |
boolean |
isDone()
Always returns true. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public java.lang.Object get()
throws ExecutionException
Future
get in interface FutureExecutionException - if the computation threw an
exception
public java.lang.Object get(long timeout,
TimeUnit granularity)
throws ExecutionException
Future
get in interface Futuretimeout - the maximum time to waitgranularity - the time unit of the timeout argument
ExecutionException - if the computation threw an
exceptionpublic boolean isDone()
isDone in interface Futurepublic boolean cancel(boolean mayInterruptIfRunning)
cancel in interface FuturemayInterruptIfRunning - true if the thread executing this
task should be interrupted; otherwise, in-progress tasks are allowed
to complete
public boolean isCancelled()
isCancelled in interface Futurepublic static Rmix.Future completed(java.lang.Object result)
result - the result of the future
public static Rmix.Future completed(java.lang.Object result,
Callback cb)
completion callback. If not null, the callback is
immediately notified about the completion.
result - the result of the futurecb - the callback to be notified about successful completion
public static Rmix.Future failed(java.lang.Throwable cause)
cause - the cause of failure
public static Rmix.Future failed(java.lang.Throwable cause,
Callback cb)
completion callback. If not null, the callback is
immediately notified about the completion.
cause - the cause of failurecb - the callback to be notified about failure
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||