V
- Type of the result for the future.public interface IgniteFuture<V>
Modifier and Type | Method and Description |
---|---|
boolean |
cancel()
Cancels this future.
|
<T> IgniteFuture<T> |
chain(IgniteClosure<? super IgniteFuture<V>,T> doneCb)
Make a chained future to convert result of this future (when complete) into a new format.
|
<T> IgniteFuture<T> |
chainAsync(IgniteClosure<? super IgniteFuture<V>,T> doneCb,
Executor exec)
Make a chained future to convert result of this future (when complete) into a new format.
|
V |
get()
Synchronously waits for completion of the computation and
returns computation result.
|
V |
get(long timeout)
Synchronously waits for completion of the computation for
up to the timeout specified and returns computation result.
|
V |
get(long timeout,
TimeUnit unit)
Synchronously waits for completion of the computation for
up to the timeout specified and returns computation result.
|
boolean |
isCancelled()
Returns
true if this task was cancelled before it completed
normally. |
boolean |
isDone()
Returns
true if this task completed. |
void |
listen(IgniteInClosure<? super IgniteFuture<V>> lsnr)
Registers listener closure to be asynchronously notified whenever future completes.
|
void |
listenAsync(IgniteInClosure<? super IgniteFuture<V>> lsnr,
Executor exec)
Registers listener closure to be asynchronously notified whenever future completes.
|
V get() throws IgniteException
IgniteInterruptedException
- Subclass of IgniteException
thrown if the wait was interrupted.IgniteFutureCancelledException
- Subclass of IgniteException
thrown if computation was cancelled.IgniteException
- If computation failed.V get(long timeout) throws IgniteException
get(long, TimeUnit.MILLISECONDS)
.timeout
- The maximum time to wait in milliseconds.IgniteInterruptedException
- Subclass of IgniteException
thrown if the wait was interrupted.IgniteFutureCancelledException
- Subclass of IgniteException
thrown if computation was cancelled.IgniteFutureTimeoutException
- Subclass of IgniteException
thrown if the wait was timed out.IgniteException
- If computation failed.V get(long timeout, TimeUnit unit) throws IgniteException
timeout
- The maximum time to wait.unit
- The time unit of the timeout
argument.IgniteInterruptedException
- Subclass of IgniteException
thrown if the wait was interrupted.IgniteFutureCancelledException
- Subclass of IgniteException
thrown if computation was cancelled.IgniteFutureTimeoutException
- Subclass of IgniteException
thrown if the wait was timed out.IgniteException
- If computation failed.boolean cancel() throws IgniteException
True
if future was canceled (i.e. was not finished prior to this call).IgniteException
- If cancellation failed.boolean isCancelled()
true
if this task was cancelled before it completed
normally.true
if this task was cancelled before it completedboolean isDone()
true
if this task completed.
Completion may be due to normal termination, an exception, or
cancellation - in all of these cases, this method will return
true
.
true
if this task completed.void listen(IgniteInClosure<? super IgniteFuture<V>> lsnr)
lsnr
- Listener closure to register. Cannot be null
.void listenAsync(IgniteInClosure<? super IgniteFuture<V>> lsnr, Executor exec)
lsnr
- Listener closure to register. Cannot be null
.exec
- Executor to run listener. Cannot be null
.<T> IgniteFuture<T> chain(IgniteClosure<? super IgniteFuture<V>,T> doneCb)
doneCb
- Done callback that is applied to this future when it finishes to produce chained future result.<T> IgniteFuture<T> chainAsync(IgniteClosure<? super IgniteFuture<V>,T> doneCb, Executor exec)
doneCb
- Done callback that is applied to this future when it finishes to produce chained future result.exec
- Executor to run done callback. Cannot be null
.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024