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 boolean
cancel()
Default no-op implementation that always returnsfalse
.static <R> ComputeTaskInternalFuture<R>
finishedFuture(GridKernalContext ctx, Class<?> taskCls, IgniteCheckedException e)
ComputeTaskSession
getTaskSession()
Gets task timeout.IgniteLogger
logger()
ComputeTaskFuture<R>
publicFuture()
String
toString()
-
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 IgniteCheckedException
Default 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:
cancel
in interfaceIgniteInternalFuture<R>
- Overrides:
cancel
in classGridFutureAdapter<R>
- Returns:
True
if future was canceled (i.e. was not finished prior to this call).- Throws:
IgniteCheckedException
- If cancellation failed.
-
toString
public String toString()
- Overrides:
toString
in classGridFutureAdapter<R>
-
logger
public IgniteLogger logger()
- Overrides:
logger
in classGridFutureAdapter<R>
- Returns:
- Logger instance.
-
-