Future implementation. Users can register additional CompletionHandlers using
addCompletionHandler(org.glassfish.grizzly.CompletionHandler) to be notified once the asynchronous
computation, represented by this Future, is complete.
A GrizzlyFuture instance can be recycled and reused.
| Modifier and Type | Method and Description |
|---|---|
| public void | addCompletionHandler(CompletionHandler<R> completionHandler)
Adds a |
| public void | markForRecycle(boolean
if true - the GrizzlyFuture result, if it support recyclable mechanism, will
be also recycled together with this GrizzlyFuture object. recycleResult)
Deprecated
Mark GrizzlyFuture as recyclable, so once result will come - GrizzlyFuture object will be recycled and returned to a thread local object pool. |
| public void | recycle(boolean
if true - the GrizzlyFuture result, if it support recyclable mechanism, will
be also recycled together with this GrizzlyFuture object. recycleResult)Recycle GrizzlyFuture now. |
| addCompletionHandler | back to summary |
|---|---|
| public void addCompletionHandler(CompletionHandler<R> completionHandler) Adds a
| |
| markForRecycle | back to summary |
|---|---|
| public void markForRecycle(boolean recycleResult)
Deprecated
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(boolean recycleResult) 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.
| |