|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.dev.vcc.util.CompletedFuture<T>
public final class CompletedFuture<T>
A Future that has already been completed.
| Constructor Summary | |
|---|---|
CompletedFuture(java.lang.String message,
java.lang.Throwable cause)
Creates a Future which has completed by throwing an exception. |
|
CompletedFuture(T value)
Creates a Future which has completed successfully. |
|
| Method Summary | |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
|
T |
get()
|
T |
get(long timeout,
java.util.concurrent.TimeUnit unit)
|
boolean |
isCancelled()
|
boolean |
isDone()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompletedFuture(T value)
Future which has completed successfully.
value - The value of the future.
public CompletedFuture(java.lang.String message,
java.lang.Throwable cause)
Future which has completed by throwing an exception.
message - The message to put in the ExecutionException.cause - The execption which was thrown.| Method Detail |
|---|
public boolean cancel(boolean mayInterruptIfRunning)
cancel in interface java.util.concurrent.Future<T>public boolean isCancelled()
isCancelled in interface java.util.concurrent.Future<T>public boolean isDone()
isDone in interface java.util.concurrent.Future<T>
public T get()
throws java.util.concurrent.ExecutionException
get in interface java.util.concurrent.Future<T>java.util.concurrent.ExecutionException
public T get(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.util.concurrent.ExecutionException
get in interface java.util.concurrent.Future<T>java.util.concurrent.ExecutionException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||