Package org.apache.ignite.compute
Interface ComputeTaskFuture<R>
-
- Type Parameters:
R
- Type of the task result returning fromComputeTask.reduce(List)
method.
- All Superinterfaces:
IgniteFuture<R>
public interface ComputeTaskFuture<R> extends IgniteFuture<R>
This class defines a handler for asynchronous task execution. It's similar in design to standard JDKFuture
interface but has improved and easier to use exception hierarchy.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description R
get()
Synchronously waits for completion of the computation 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.ComputeTaskSession
getTaskSession()
Gets task session of execution grid task.-
Methods inherited from interface org.apache.ignite.lang.IgniteFuture
cancel, chain, chainAsync, get, isCancelled, isDone, listen, listenAsync
-
-
-
-
Method Detail
-
get
R get()
Synchronously waits for completion of the computation and returns computation result.- Specified by:
get
in interfaceIgniteFuture<R>
- Returns:
- Computation result.
- Throws:
ComputeTaskTimeoutException
- If task execution timed out.
-
get
R get(long timeout, TimeUnit unit)
Synchronously waits for completion of the computation for up to the timeout specified and returns computation result.- Specified by:
get
in interfaceIgniteFuture<R>
- Parameters:
timeout
- The maximum time to wait.unit
- The time unit of thetimeout
argument.- Returns:
- Computation result.
- Throws:
ComputeTaskTimeoutException
- If task execution timed out.
-
getTaskSession
ComputeTaskSession getTaskSession()
Gets task session of execution grid task.- Returns:
- Task session.
-
-