Future implementation with the specific unmodifiable result.
Future
| Modifier and Type | Field and Description |
|---|---|
| private static final ThreadCache. | |
| private Throwable | |
| private boolean | |
| protected R |
| Access | Constructor and Description |
|---|---|
| private | |
| private | |
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | addCompletionHandler(final CompletionHandler<R> completionHandler)
Implements org. Adds a |
| public boolean | Returns: cancel state, which was set during construction.Implements java. Do nothing. |
| public static <R> ReadyFutureImpl | |
| public static <R> ReadyFutureImpl | |
| public static <R> ReadyFutureImpl | |
| public void | failure(Throwable failure)
Implements org. Should not be called for ReadyFutureImpl |
| public R | get()
Implements java. Waits if necessary for the computation to complete, and then retrieves its result. |
| public R | get(long timeout, TimeUnit unit)
Implements java. Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available. |
| public R | Returns: current result value without any blocking.Implements org. Get current result value without any blocking. |
| public boolean | isCancelled()
Implements java. Returns |
| public boolean | |
| public void | markForRecycle(boolean recycleResult)
Implements org. Mark GrizzlyFuture as recyclable, so once result will come - GrizzlyFuture object will be recycled and returned to a thread local object pool. |
| public void | |
| public void | recycle(boolean recycleResult)
Implements org. Recycle GrizzlyFuture now. |
| private void | |
| public void | result(R result)
Implements org. Set the result value and notify about operation completion. |
| public void | |
| private static <R> ReadyFutureImpl |
| CACHE_IDX | back to summary |
|---|---|
| private static final ThreadCache. | |
| failure | back to summary |
|---|---|
| private Throwable failure | |
| isCancelled | back to summary |
|---|---|
| private boolean isCancelled | |
| result | back to summary |
|---|---|
| protected R result | |
| ReadyFutureImpl | back to summary |
|---|---|
| private ReadyFutureImpl() Construct cancelled | |
| ReadyFutureImpl | back to summary |
|---|---|
| private ReadyFutureImpl(R result) Construct | |
| ReadyFutureImpl | back to summary |
|---|---|
| private ReadyFutureImpl(Throwable failure) Construct failed | |
| ReadyFutureImpl | back to summary |
|---|---|
| private ReadyFutureImpl(R result, Throwable failure, boolean isCancelled) | |
| addCompletionHandler | back to summary |
|---|---|
| public void addCompletionHandler(final CompletionHandler<R> completionHandler) Implements org. Doc from org. Adds a
| |
| cancel | back to summary |
|---|---|
| public boolean cancel(boolean mayInterruptIfRunning) Implements java. Do nothing.
| |
| create | back to summary |
|---|---|
| public static <R> ReadyFutureImpl Construct cancelled | |
| create | back to summary |
|---|---|
| public static <R> ReadyFutureImpl Construct | |
| create | back to summary |
|---|---|
| public static <R> ReadyFutureImpl Construct failed | |
| failure | back to summary |
|---|---|
| public void failure(Throwable failure) Implements org. Should not be called for ReadyFutureImpl
| |
| get | back to summary |
|---|---|
| public R get() throws InterruptedException, ExecutionException Implements java. Doc from java. Waits if necessary for the computation to complete, and then retrieves its result.
| |
| get | back to summary |
|---|---|
| public R get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException Implements java. Doc from java. Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.
| |
| getResult | back to summary |
|---|---|
| public R getResult() Implements org. Get current result value without any blocking.
| |
| isCancelled | back to summary |
|---|---|
| public boolean isCancelled() Implements java. Doc from java. Returns
| |
| isDone | back to summary |
|---|---|
| public boolean isDone() Implements java. Doc from java. Returns
| |
| markForRecycle | back to summary |
|---|---|
| public void markForRecycle(boolean recycleResult) Implements org. Doc from org. Mark GrizzlyFuture as recyclable, so once result will come - GrizzlyFuture object will be recycled and returned to a thread local object pool. You can consider to use this method, if you're not interested in using this GrizzlyFuture object.
| |
| recycle | back to summary |
|---|---|
| public void recycle() Implements org.
| |
| recycle | back to summary |
|---|---|
| public void recycle(boolean recycleResult) Implements org. Doc from org. Recycle GrizzlyFuture now. This method could be used, if you're not interested in using this GrizzlyFuture object, and you're sure this object is not used by any other application part.
| |
| reset | back to summary |
|---|---|
| private void reset() | |
| result | back to summary |
|---|---|
| public void result(R result) Implements org. Doc from org. Set the result value and notify about operation completion.
| |
| setResult | back to summary |
|---|---|
| public void setResult(R result) Should not be called for ReadyFutureImpl | |
| takeFromCache | back to summary |
|---|---|
private static <R> ReadyFutureImpl
| |