protected class PlatformCompute.ComputeConvertingFuture extends Object implements IgniteInternalFuture
Constructor and Description |
---|
PlatformCompute.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 PlatformCompute.ComputeConvertingFuture(ComputeTaskFuture fut)
fut
- Future to wrap.public Object get() throws IgniteCheckedException
get
in interface IgniteInternalFuture
IgniteInterruptedCheckedException
- 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 IgniteInternalFuture
timeout
- 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 IgniteInternalFuture
timeout
- 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 IgniteInternalFuture
IgniteFutureCancelledCheckedException
- Subclass of IgniteCheckedException
throws if computation
was cancelled.IgniteCheckedException
- If computation failed.public boolean cancel() throws IgniteCheckedException
cancel
in interface IgniteInternalFuture
True
if future was canceled (i.e. was not finished prior to this call).IgniteCheckedException
- If cancellation failed.public boolean isDone()
isDone
in interface IgniteInternalFuture
True
if computation is done, false
otherwise.public boolean isCancelled()
true
if this computation was cancelled before it completed normally.isCancelled
in interface IgniteInternalFuture
True
if this computation was cancelled before it completed normally.public void listen(IgniteInClosure lsnr)
listen
in interface IgniteInternalFuture
lsnr
- Listener closure to register. If not provided - this method is no-op.public IgniteInternalFuture chain(IgniteClosure doneCb)
chain
in interface IgniteInternalFuture
doneCb
- 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 IgniteInternalFuture
doneCb
- 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 IgniteInternalFuture
public Object result()
result
in interface IgniteInternalFuture
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017