R - Type of the task result returning from GridComputeTask.reduce(List) method.public interface GridComputeTaskFuture<R> extends GridFuture<R>
Future interface but has improved and easier to use exception
hierarchy.| Modifier and Type | Method and Description |
|---|---|
R |
get()
Synchronously waits for completion of the computation and
returns computation result.
|
R |
get(long timeout)
Synchronously waits for completion of the computation for
up to the timeout specified and returns computation result.
|
R |
get(long timeout,
TimeUnit unit)
Synchronously waits for completion of the computation for
up to the timeout specified and returns computation result.
|
GridComputeTaskSession |
getTaskSession()
Gets task session of execution grid task.
|
boolean |
isMapped()
Checks if "map" step has completed (which means that
GridComputeTask.map(List, Object)
method has finished). |
boolean |
waitForMap()
Waits until
GridComputeTask.map(List, Object) method completes. |
boolean |
waitForMap(long timeout)
Waits for a specified timeout in milliseconds for
GridComputeTask.map(List, Object)
method to complete. |
boolean |
waitForMap(long timeout,
TimeUnit unit)
Waits for a specified timeout in milliseconds for
GridComputeTask.map(List, Object)
method to complete. |
cancel, chain, concurrentNotify, concurrentNotify, duration, isCancelled, isDone, listenAsync, startTime, stopListenAsync, syncNotify, syncNotifyR get() throws GridException
get in interface GridFuture<R>GridComputeTaskTimeoutException - If task execution timed out.GridInterruptedException - Subclass of GridException thrown if the wait was interrupted.GridFutureCancelledException - Subclass of GridException throws if computation was cancelled.GridException - If computation failed.R get(long timeout) throws GridException
get(long, TimeUnit.MILLISECONDS).get in interface GridFuture<R>timeout - The maximum time to wait in milliseconds.GridComputeTaskTimeoutException - If task execution timed out.GridInterruptedException - Subclass of GridException thrown if the wait was interrupted.GridFutureTimeoutException - Subclass of GridException thrown if the wait was timed out.GridFutureCancelledException - Subclass of GridException throws if computation was cancelled.GridException - If computation failed.R get(long timeout, TimeUnit unit) throws GridException
get in interface GridFuture<R>timeout - The maximum time to wait.unit - The time unit of the timeout argument.GridComputeTaskTimeoutException - If task execution timed out.GridInterruptedException - Subclass of GridException thrown if the wait was interrupted.GridFutureTimeoutException - Subclass of GridException thrown if the wait was timed out.GridFutureCancelledException - Subclass of GridException throws if computation was cancelled.GridException - If computation failed.GridComputeTaskSession getTaskSession()
boolean isMapped()
GridComputeTask.map(List, Object)
method has finished).true if map step has completed.boolean waitForMap()
throws GridException
GridComputeTask.map(List, Object) method completes. This may be useful
when it is desired to know the list of all job siblings for the task, as list
of job siblings gets finalized only after the map step completes.
Note that this method will also return if the task fails.
true if map step has completed, false otherwise.GridException - If got interrupted while waiting or any other failure.boolean waitForMap(long timeout)
throws GridException
GridComputeTask.map(List, Object)
method to complete. This may be useful when it is desired to know the list of all
job siblings for the task, as list of job siblings gets finalized only after the map
step completes.timeout - Maximum time to wait.true if map step has completed, false otherwise.GridException - If got interrupted while waiting or any other failure.boolean waitForMap(long timeout,
TimeUnit unit)
throws GridException
GridComputeTask.map(List, Object)
method to complete. This may be useful when it is desired to know the list of all
job siblings for the task, as list of job siblings gets finalized only after the map
step completes.timeout - Maximum time to wait.unit - Time unit for time parameter.true if map step has completed, false otherwise.GridException - If got interrupted while waiting or any other failure.Copyright © 2014. All rights reserved.