Interface IJobExecution<T>
Job control object, provides information about the job execution process and result, allows cancelling the job.
public interface IJobExecution<T>
Type Parameters
TJob result type.
Properties
Id
Gets the job ID.
Guid Id { get; }
Property Value
Node
Gets the node where the job is executing.
IClusterNode Node { get; }
Property Value
Methods
ChangePriorityAsync(int)
Changes the job priority. After priority change the job will be the last in the queue of jobs with the same priority.
Task<bool?> ChangePriorityAsync(int priority)
Parameters
priorityintNew priority.
Returns
- Task<bool?>
Returns
trueif the priority was successfully changed,falsewhen the priority couldn't be changed (job is already executing or completed),nullif the job was not found (no longer exists due to exceeding the retention time limit).
GetResultAsync()
Gets the job execution result.
Task<T> GetResultAsync()
Returns
- Task<T>
Job execution result.
GetStateAsync()
Gets the job execution state. Can be null if the job status no longer exists due to exceeding the retention time limit.
Task<JobState?> GetStateAsync()