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 from `ComputeTask.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 and Description
`ComputeTaskInternalFuture(ComputeTaskSession ses, GridKernalContext ctx)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `cancel()` Default no-op implementation that always returns `false`.
`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, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, onCancelled, onDone, onDone, onDone, onDone, onDone, reset, result`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### 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 returns `false`. Futures that do support cancellation should override this method and call `GridFutureAdapter.onCancelled()` callback explicitly if cancellation indeed did happen.

Specified by:
  `cancel` in interface `IgniteInternalFuture<R>`
Overrides:
  `cancel` in class `GridFutureAdapter<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 class `GridFutureAdapter<R>`

#### logger

    public IgniteLogger logger()

Overrides:
  `logger` in class `GridFutureAdapter<R>`
Returns:
  Logger instance.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.4.0
Release Date | : March 5 2018