Package org.apache.ignite.compute
Interface JobExecution<R>
- Type Parameters:
R
- Job result type.
public interface JobExecution<R>
Job control object, provides information about the job execution process and result, allows cancelling the job.
-
Method Summary
Modifier and TypeMethodDescriptionCompletableFuture<@Nullable Boolean>
changePriorityAsync
(int newPriority) Changes job priority.default CompletableFuture<@Nullable UUID>
idAsync()
Returns the id of the job.node()
A cluster node on which this job is executing.Returns job's execution result.CompletableFuture<@Nullable JobState>
Returns the current state of the job.
-
Method Details
-
resultAsync
CompletableFuture<R> resultAsync()Returns job's execution result.- Returns:
- Job's execution result future.
-
stateAsync
CompletableFuture<@Nullable JobState> stateAsync()Returns the current state of the job. The job state may be deleted and thus returnnull
if the time for retaining job state has been exceeded.- Returns:
- The current state of the job, or
null
if the job state no longer exists due to exceeding the retention time limit.
-
idAsync
Returns the id of the job. The job state may be deleted and thus returnnull
if the time for retaining job state has been exceeded.- Returns:
- The id of the job, or
null
if the job state no longer exists due to exceeding the retention time limit.
-
changePriorityAsync
Changes job priority. After priority change job will be the last in the queue of jobs with the same priority.- Parameters:
newPriority
- new priority.- Returns:
- The future which will be completed with
true
when the priority is changed,false
when the priority couldn't be changed (if the job is already executing or completed), ornull
if the job no longer exists due to exceeding the retention time limit.
-
node
ClusterNode node()A cluster node on which this job is executing.- Returns:
- Node instance.
-