|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.grizzly.impl.ReadyFutureImpl<R>
public class ReadyFutureImpl<R>
Future implementation with the specific unmodifiable result.
Future| Field Summary | |
|---|---|
protected R |
result
|
| Constructor Summary | |
|---|---|
|
ReadyFutureImpl()
Construct cancelled Future. |
|
ReadyFutureImpl(R result)
Construct Future with the result. |
protected |
ReadyFutureImpl(R result,
Throwable failure,
boolean isCancelled)
|
|
ReadyFutureImpl(Throwable failure)
Construct failed Future. |
| Method Summary | |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
Do nothing. |
void |
failure(Throwable failure)
Should not be called for ReadyFutureImpl |
R |
get()
|
R |
get(long timeout,
TimeUnit unit)
|
R |
getResult()
Get current result value without any blocking. |
boolean |
isCancelled()
|
boolean |
isDone()
|
void |
setResult(R result)
Should not be called for ReadyFutureImpl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final R result
| Constructor Detail |
|---|
public ReadyFutureImpl()
Future.
public ReadyFutureImpl(R result)
Future with the result.
public ReadyFutureImpl(Throwable failure)
Future.
protected ReadyFutureImpl(R result,
Throwable failure,
boolean isCancelled)
| Method Detail |
|---|
public R getResult()
public void setResult(R result)
public boolean cancel(boolean mayInterruptIfRunning)
cancel in interface Future<R>public boolean isCancelled()
isCancelled in interface Future<R>public boolean isDone()
isDone in interface Future<R>
public R get()
throws InterruptedException,
ExecutionException
get in interface Future<R>InterruptedException
ExecutionException
public R get(long timeout,
TimeUnit unit)
throws InterruptedException,
ExecutionException,
TimeoutException
get in interface Future<R>InterruptedException
ExecutionException
TimeoutExceptionpublic void failure(Throwable failure)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||