Package org.apache.ignite.internal
Class ComputeTaskInternalFuture<R>
- java.lang.Object
-
- org.apache.ignite.internal.util.future.GridFutureAdapter<R>
-
- org.apache.ignite.internal.ComputeTaskInternalFuture<R>
-
- Type Parameters:
R- Type of the task result returning fromComputeTask.reduce(List)method.
- All Implemented Interfaces:
IgniteInternalFuture<R>
public class ComputeTaskInternalFuture<R> extends GridFutureAdapter<R>
This class provide implementation for task future.
-
-
Constructor Summary
Constructors Constructor Description ComputeTaskInternalFuture(ComputeTaskSession ses, GridKernalContext ctx)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel()Default no-op implementation that always returnsfalse.static <R> ComputeTaskInternalFuture<R>finishedFuture(GridKernalContext ctx, Class<?> taskCls, IgniteCheckedException e)ComputeTaskSessiongetTaskSession()Gets task timeout.IgniteLoggerlogger()ComputeTaskFuture<R>publicFuture()StringtoString()-
Methods inherited from class org.apache.ignite.internal.util.future.GridFutureAdapter
chain, chain, chain, chain, chainCompose, chainCompose, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, listen, onCancelled, onDone, onDone, onDone, onDone, onDone, reset, result
-
-
-
-
Constructor Detail
-
ComputeTaskInternalFuture
public ComputeTaskInternalFuture(ComputeTaskSession ses, GridKernalContext ctx)
- Parameters:
ses- Task session instance.ctx- Kernal context.
-
-
Method Detail
-
finishedFuture
public static <R> ComputeTaskInternalFuture<R> finishedFuture(GridKernalContext ctx, Class<?> taskCls, IgniteCheckedException e)
- Parameters:
ctx- Context.taskCls- Task class.e- Error.- Returns:
- Finished task future.
-
publicFuture
public ComputeTaskFuture<R> publicFuture()
- Returns:
- Future returned by public API.
-
getTaskSession
public ComputeTaskSession getTaskSession()
Gets task timeout.- Returns:
- Task timeout.
-
cancel
public boolean cancel() throws IgniteCheckedExceptionDefault no-op implementation that always returnsfalse. Futures that do support cancellation should override this method and callGridFutureAdapter.onCancelled()callback explicitly if cancellation indeed did happen.- Specified by:
cancelin interfaceIgniteInternalFuture<R>- Overrides:
cancelin classGridFutureAdapter<R>- Returns:
Trueif future was canceled (i.e. was not finished prior to this call).- Throws:
IgniteCheckedException- If cancellation failed.
-
toString
public String toString()
- Overrides:
toStringin classGridFutureAdapter<R>
-
logger
public IgniteLogger logger()
- Overrides:
loggerin classGridFutureAdapter<R>- Returns:
- Logger instance.
-
-