protected class PlatformCompute.ComputeConvertingFuture extends Object implements IgniteInternalFuture
| Constructor and Description |
|---|
ComputeConvertingFuture(ComputeTaskFuture fut)
Ctor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel()
Cancels this future.
|
IgniteInternalFuture |
chain(IgniteClosure doneCb)
Make a chained future to convert result of this future (when complete) into a new format.
|
IgniteInternalFuture |
chain(IgniteClosure doneCb,
Executor exec)
Make a chained future to convert result of this future (when complete) into a new format.
|
protected Object |
convertResult(Object obj)
Converts future result.
|
Throwable |
error() |
Object |
get()
Synchronously waits for completion of the computation and
returns computation result.
|
Object |
get(long timeout)
Synchronously waits for completion of the computation for
up to the timeout specified and returns computation result.
|
Object |
get(long timeout,
TimeUnit unit)
Synchronously waits for completion of the computation for
up to the timeout specified and returns computation result.
|
Object |
getUninterruptibly()
Synchronously waits for completion of the computation and returns computation result ignoring interrupts.
|
boolean |
isCancelled()
Returns
true if this computation was cancelled before it completed normally. |
boolean |
isDone()
Checks if computation is done.
|
void |
listen(IgniteInClosure lsnr)
Registers listener closure to be asynchronously notified whenever future completes.
|
Object |
result() |
public ComputeConvertingFuture(ComputeTaskFuture fut)
fut - Future to wrap.public Object get() throws IgniteCheckedException
get in interface IgniteInternalFutureIgniteInterruptedCheckedException - Subclass of IgniteCheckedException thrown if the wait was interrupted.IgniteFutureCancelledCheckedException - Subclass of IgniteCheckedException throws if computation was cancelled.IgniteCheckedException - If computation failed.public Object get(long timeout) throws IgniteCheckedException
get(long, TimeUnit.MILLISECONDS).get in interface IgniteInternalFuturetimeout - The maximum time to wait in milliseconds.IgniteInterruptedCheckedException - Subclass of IgniteCheckedException thrown if the wait was interrupted.IgniteFutureTimeoutCheckedException - Subclass of IgniteCheckedException thrown if the wait was timed out.IgniteFutureCancelledCheckedException - Subclass of IgniteCheckedException throws if computation was cancelled.IgniteCheckedException - If computation failed.public Object get(long timeout, TimeUnit unit) throws IgniteCheckedException
get in interface IgniteInternalFuturetimeout - The maximum time to wait.unit - The time unit of the timeout argument.IgniteInterruptedCheckedException - Subclass of IgniteCheckedException thrown if the wait was interrupted.IgniteFutureTimeoutCheckedException - Subclass of IgniteCheckedException thrown if the wait was timed out.IgniteFutureCancelledCheckedException - Subclass of IgniteCheckedException throws if computation was cancelled.IgniteCheckedException - If computation failed.public Object getUninterruptibly() throws IgniteCheckedException
getUninterruptibly in interface IgniteInternalFutureIgniteFutureCancelledCheckedException - Subclass of IgniteCheckedException throws if computation
was cancelled.IgniteCheckedException - If computation failed.public boolean cancel()
throws IgniteCheckedException
cancel in interface IgniteInternalFutureTrue if future was canceled (i.e. was not finished prior to this call).IgniteCheckedException - If cancellation failed.public boolean isDone()
isDone in interface IgniteInternalFutureTrue if computation is done, false otherwise.public boolean isCancelled()
true if this computation was cancelled before it completed normally.isCancelled in interface IgniteInternalFutureTrue if this computation was cancelled before it completed normally.public void listen(IgniteInClosure lsnr)
listen in interface IgniteInternalFuturelsnr - Listener closure to register. If not provided - this method is no-op.public IgniteInternalFuture chain(IgniteClosure doneCb)
chain in interface IgniteInternalFuturedoneCb - Done callback that is applied to this future when it finishes to produce chained future result.public IgniteInternalFuture chain(IgniteClosure doneCb, Executor exec)
chain in interface IgniteInternalFuturedoneCb - Done callback that is applied to this future when it finishes to produce chained future result.exec - Executor to run callback.public Throwable error()
error in interface IgniteInternalFuturepublic Object result()
result in interface IgniteInternalFuture
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.1 Release Date : May 21 2020