Table of Contents

Interface ITaskExecution<T>

Namespace
Apache.Ignite.Compute
Assembly
Apache.Ignite.dll

Compute task control object, provides information about the task execution process and result, allows cancelling the task.

public interface ITaskExecution<T>

Type Parameters

T

Task result type.

Properties

Id

Gets the task ID.

Guid Id { get; }

Property Value

Guid

JobIds

Gets the IDs of the jobs that are part of this task.

IReadOnlyList<Guid> JobIds { get; }

Property Value

IReadOnlyList<Guid>

Methods

ChangePriorityAsync(int)

Changes the task priority. After priority change the task will be the last in the queue of tasks with the same priority.

Task<bool?> ChangePriorityAsync(int priority)

Parameters

priority int

New priority.

Returns

Task<bool?>

Returns true if the priority was successfully changed, false when the priority couldn't be changed (task is already executing or completed), null if the task was not found (no longer exists due to exceeding the retention time limit).

GetJobStatesAsync()

Gets the job states for all jobs that are part of this task.

Task<IList<JobState?>> GetJobStatesAsync()

Returns

Task<IList<JobState>>

A list of job states. Can contain nulls when the time for retaining job state has been exceeded.

GetResultAsync()

Gets the task execution result.

Task<T> GetResultAsync()

Returns

Task<T>

Task execution result.

GetStateAsync()

Gets the task execution state. Can be null if the task status no longer exists due to exceeding the retention time limit.

Task<TaskState?> GetStateAsync()

Returns

Task<TaskState>

Task execution state. Can be null if the task status no longer exists due to exceeding the retention time limit.