Future implementation.
Future
| Modifier and Type | Field and Description |
|---|---|
| private static final ThreadCache. | |
| protected Set | |
| protected Throwable | |
| protected boolean | |
| protected boolean | |
| protected int | |
| protected R |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | addCompletionHandler(final CompletionHandler<R> completionHandler)
Implements org. Adds a |
| public boolean | cancel(boolean mayInterruptIfRunning)
Implements java. Attempts to cancel execution of this task. |
| public static <R> UnsafeFutureImpl | |
| public void | failure(Throwable failure)
Implements org. Notify about the failure, occurred during asynchronous operation execution. |
| 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. |
| private void | notifyCompletionHandler(final CompletionHandler<R> completionHandler)
Notify single |
| private void | |
| protected void | |
| public void | recycle(boolean recycleResult)
Implements org. Recycle GrizzlyFuture now. |
| public void | |
| protected void | |
| public void | result(R
the result value result)Implements org. Set the result value and notify about operation completion. |
| CACHE_IDX | back to summary |
|---|---|
| private static final ThreadCache. | |
| completionHandlers | back to summary |
|---|---|
| protected Set<CompletionHandler<R>> completionHandlers | |
| failure | back to summary |
|---|---|
| protected Throwable failure | |
| isCancelled | back to summary |
|---|---|
| protected boolean isCancelled | |
| isDone | back to summary |
|---|---|
| protected boolean isDone | |
| recycleMark | back to summary |
|---|---|
| protected int recycleMark | |
| result | back to summary |
|---|---|
| protected R result | |
| UnsafeFutureImpl | back to summary |
|---|---|
| private UnsafeFutureImpl() | |
| 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. Doc from java. Attempts to cancel execution of this task. This method has no
effect if the task is already completed or cancelled, or could
not be cancelled for some other reason. Otherwise, if this
task has not started when The return value from this method does not necessarily
indicate whether the task is now cancelled; use
| |
| create | back to summary |
|---|---|
| public static <R> UnsafeFutureImpl Construct
| |
| failure | back to summary |
|---|---|
| public void failure(Throwable failure) Implements org. Notify about the failure, occurred during asynchronous operation execution.
| |
| 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.
| |
| notifyCompletionHandler | back to summary |
|---|---|
| private void notifyCompletionHandler(final CompletionHandler<R> completionHandler) Notify single | |
| notifyCompletionHandlers | back to summary |
|---|---|
| private void notifyCompletionHandlers() Notify registered | |
| notifyHaveResult | back to summary |
|---|---|
| protected void notifyHaveResult() Notify blocked listeners threads about operation completion. | |
| 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.
| |
| recycle | back to summary |
|---|---|
| public void recycle() Implements org.
| |
| reset | back to summary |
|---|---|
| protected void reset() | |
| result | back to summary |
|---|---|
| public void result(R result) Implements org. Set the result value and notify about operation completion.
| |