Tasks Interface

public interface Tasks

An instance of this class provides access to all the operations defined in Tasks.

Method Summary

Modifier and Type Method and Description
void add(String jobId, TaskAddParameter task)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

void add(String jobId, TaskAddParameter task, TaskAddOptions taskAddOptions)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Observable<Void> addAsync(String jobId, TaskAddParameter task)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

ServiceFuture<Void> addAsync(String jobId, TaskAddParameter task, final ServiceCallback<Void> serviceCallback)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Observable<Void> addAsync(String jobId, TaskAddParameter task, TaskAddOptions taskAddOptions)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

ServiceFuture<Void> addAsync(String jobId, TaskAddParameter task, TaskAddOptions taskAddOptions, final ServiceCallback<Void> serviceCallback)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

TaskAddCollectionResult addCollection(String jobId, List<TaskAddParameter> value)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

TaskAddCollectionResult addCollection(String jobId, List<TaskAddParameter> value, TaskAddCollectionOptions taskAddCollectionOptions)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Observable<TaskAddCollectionResult> addCollectionAsync(String jobId, List<TaskAddParameter> value)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

ServiceFuture<TaskAddCollectionResult> addCollectionAsync(String jobId, List<TaskAddParameter> value, final ServiceCallback<TaskAddCollectionResult> serviceCallback)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Observable<TaskAddCollectionResult> addCollectionAsync(String jobId, List<TaskAddParameter> value, TaskAddCollectionOptions taskAddCollectionOptions)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

ServiceFuture<TaskAddCollectionResult> addCollectionAsync(String jobId, List<TaskAddParameter> value, TaskAddCollectionOptions taskAddCollectionOptions, final ServiceCallback<TaskAddCollectionResult> serviceCallback)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Observable<ServiceResponseWithHeaders<TaskAddCollectionResult, TaskAddCollectionHeaders>> addCollectionWithServiceResponseAsync(String jobId, List<TaskAddParameter> value)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Observable<ServiceResponseWithHeaders<TaskAddCollectionResult, TaskAddCollectionHeaders>> addCollectionWithServiceResponseAsync(String jobId, List<TaskAddParameter> value, TaskAddCollectionOptions taskAddCollectionOptions)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Observable<ServiceResponseWithHeaders<Void, TaskAddHeaders>> addWithServiceResponseAsync(String jobId, TaskAddParameter task)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Observable<ServiceResponseWithHeaders<Void, TaskAddHeaders>> addWithServiceResponseAsync(String jobId, TaskAddParameter task, TaskAddOptions taskAddOptions)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

void delete(String jobId, String taskId)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

void delete(String jobId, String taskId, TaskDeleteOptions taskDeleteOptions)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

Observable<Void> deleteAsync(String jobId, String taskId)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

ServiceFuture<Void> deleteAsync(String jobId, String taskId, final ServiceCallback<Void> serviceCallback)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

Observable<Void> deleteAsync(String jobId, String taskId, TaskDeleteOptions taskDeleteOptions)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

ServiceFuture<Void> deleteAsync(String jobId, String taskId, TaskDeleteOptions taskDeleteOptions, final ServiceCallback<Void> serviceCallback)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

Observable<ServiceResponseWithHeaders<Void, TaskDeleteHeaders>> deleteWithServiceResponseAsync(String jobId, String taskId)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

Observable<ServiceResponseWithHeaders<Void, TaskDeleteHeaders>> deleteWithServiceResponseAsync(String jobId, String taskId, TaskDeleteOptions taskDeleteOptions)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

CloudTask get(String jobId, String taskId)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

CloudTask get(String jobId, String taskId, TaskGetOptions taskGetOptions)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Observable<CloudTask> getAsync(String jobId, String taskId)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

ServiceFuture<CloudTask> getAsync(String jobId, String taskId, final ServiceCallback<CloudTask> serviceCallback)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Observable<CloudTask> getAsync(String jobId, String taskId, TaskGetOptions taskGetOptions)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

ServiceFuture<CloudTask> getAsync(String jobId, String taskId, TaskGetOptions taskGetOptions, final ServiceCallback<CloudTask> serviceCallback)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Observable<ServiceResponseWithHeaders<CloudTask, TaskGetHeaders>> getWithServiceResponseAsync(String jobId, String taskId)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Observable<ServiceResponseWithHeaders<CloudTask, TaskGetHeaders>> getWithServiceResponseAsync(String jobId, String taskId, TaskGetOptions taskGetOptions)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

PagedList<CloudTask> list(final String jobId)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

PagedList<CloudTask> list(final String jobId, final TaskListOptions taskListOptions)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Observable<Page<CloudTask>> listAsync(final String jobId)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

ServiceFuture<List<CloudTask>> listAsync(final String jobId, final ListOperationCallback<CloudTask> serviceCallback)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Observable<Page<CloudTask>> listAsync(final String jobId, final TaskListOptions taskListOptions)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

ServiceFuture<List<CloudTask>> listAsync(final String jobId, final TaskListOptions taskListOptions, final ListOperationCallback<CloudTask> serviceCallback)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

PagedList<CloudTask> listNext(final String nextPageLink)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

PagedList<CloudTask> listNext(final String nextPageLink, final TaskListNextOptions taskListNextOptions)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Observable<Page<CloudTask>> listNextAsync(final String nextPageLink)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

ServiceFuture<List<CloudTask>> listNextAsync(final String nextPageLink, final ServiceFuture<List<CloudTask>> serviceFuture, final ListOperationCallback<CloudTask> serviceCallback)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Observable<Page<CloudTask>> listNextAsync(final String nextPageLink, final TaskListNextOptions taskListNextOptions)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

ServiceFuture<List<CloudTask>> listNextAsync(final String nextPageLink, final TaskListNextOptions taskListNextOptions, final ServiceFuture<List<CloudTask>> serviceFuture, final ListOperationCallback<CloudTask> serviceCallback)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Observable<ServiceResponseWithHeaders<Page<CloudTask>, TaskListHeaders>> listNextWithServiceResponseAsync(final String nextPageLink)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Observable<ServiceResponseWithHeaders<Page<CloudTask>, TaskListHeaders>> listNextWithServiceResponseAsync(final String nextPageLink, final TaskListNextOptions taskListNextOptions)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

CloudTaskListSubtasksResult listSubtasks(String jobId, String taskId)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

CloudTaskListSubtasksResult listSubtasks(String jobId, String taskId, TaskListSubtasksOptions taskListSubtasksOptions)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

Observable<CloudTaskListSubtasksResult> listSubtasksAsync(String jobId, String taskId)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

ServiceFuture<CloudTaskListSubtasksResult> listSubtasksAsync(String jobId, String taskId, final ServiceCallback<CloudTaskListSubtasksResult> serviceCallback)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

Observable<CloudTaskListSubtasksResult> listSubtasksAsync(String jobId, String taskId, TaskListSubtasksOptions taskListSubtasksOptions)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

ServiceFuture<CloudTaskListSubtasksResult> listSubtasksAsync(String jobId, String taskId, TaskListSubtasksOptions taskListSubtasksOptions, final ServiceCallback<CloudTaskListSubtasksResult> serviceCallback)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

Observable<ServiceResponseWithHeaders<CloudTaskListSubtasksResult, TaskListSubtasksHeaders>> listSubtasksWithServiceResponseAsync(String jobId, String taskId)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

Observable<ServiceResponseWithHeaders<CloudTaskListSubtasksResult, TaskListSubtasksHeaders>> listSubtasksWithServiceResponseAsync(String jobId, String taskId, TaskListSubtasksOptions taskListSubtasksOptions)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

Observable<ServiceResponseWithHeaders<Page<CloudTask>, TaskListHeaders>> listWithServiceResponseAsync(final String jobId)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Observable<ServiceResponseWithHeaders<Page<CloudTask>, TaskListHeaders>> listWithServiceResponseAsync(final String jobId, final TaskListOptions taskListOptions)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

void reactivate(String jobId, String taskId)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

void reactivate(String jobId, String taskId, TaskReactivateOptions taskReactivateOptions)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

Observable<Void> reactivateAsync(String jobId, String taskId)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

ServiceFuture<Void> reactivateAsync(String jobId, String taskId, final ServiceCallback<Void> serviceCallback)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

Observable<Void> reactivateAsync(String jobId, String taskId, TaskReactivateOptions taskReactivateOptions)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

ServiceFuture<Void> reactivateAsync(String jobId, String taskId, TaskReactivateOptions taskReactivateOptions, final ServiceCallback<Void> serviceCallback)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

Observable<ServiceResponseWithHeaders<Void, TaskReactivateHeaders>> reactivateWithServiceResponseAsync(String jobId, String taskId)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

Observable<ServiceResponseWithHeaders<Void, TaskReactivateHeaders>> reactivateWithServiceResponseAsync(String jobId, String taskId, TaskReactivateOptions taskReactivateOptions)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

void terminate(String jobId, String taskId)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

void terminate(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

Observable<Void> terminateAsync(String jobId, String taskId)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

ServiceFuture<Void> terminateAsync(String jobId, String taskId, final ServiceCallback<Void> serviceCallback)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

Observable<Void> terminateAsync(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

ServiceFuture<Void> terminateAsync(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions, final ServiceCallback<Void> serviceCallback)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

Observable<ServiceResponseWithHeaders<Void, TaskTerminateHeaders>> terminateWithServiceResponseAsync(String jobId, String taskId)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

Observable<ServiceResponseWithHeaders<Void, TaskTerminateHeaders>> terminateWithServiceResponseAsync(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

void update(String jobId, String taskId)

Updates the properties of the specified task.

void update(String jobId, String taskId, TaskConstraints constraints, TaskUpdateOptions taskUpdateOptions)

Updates the properties of the specified task.

Observable<Void> updateAsync(String jobId, String taskId)

Updates the properties of the specified task.

ServiceFuture<Void> updateAsync(String jobId, String taskId, final ServiceCallback<Void> serviceCallback)

Updates the properties of the specified task.

Observable<Void> updateAsync(String jobId, String taskId, TaskConstraints constraints, TaskUpdateOptions taskUpdateOptions)

Updates the properties of the specified task.

ServiceFuture<Void> updateAsync(String jobId, String taskId, TaskConstraints constraints, TaskUpdateOptions taskUpdateOptions, final ServiceCallback<Void> serviceCallback)

Updates the properties of the specified task.

Observable<ServiceResponseWithHeaders<Void, TaskUpdateHeaders>> updateWithServiceResponseAsync(String jobId, String taskId)

Updates the properties of the specified task.

Observable<ServiceResponseWithHeaders<Void, TaskUpdateHeaders>> updateWithServiceResponseAsync(String jobId, String taskId, TaskConstraints constraints, TaskUpdateOptions taskUpdateOptions)

Updates the properties of the specified task.

Method Details

add

public void add(String jobId, TaskAddParameter task)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task is to be added.
task - The task to be added.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

add

public void add(String jobId, TaskAddParameter task, TaskAddOptions taskAddOptions)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task is to be added.
task - The task to be added.
taskAddOptions - Additional parameters for the operation

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

addAsync

public Observable addAsync(String jobId, TaskAddParameter task)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task is to be added.
task - The task to be added.

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

addAsync

public ServiceFuture addAsync(String jobId, TaskAddParameter task, final ServiceCallback serviceCallback)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task is to be added.
task - The task to be added.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

addAsync

public Observable addAsync(String jobId, TaskAddParameter task, TaskAddOptions taskAddOptions)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task is to be added.
task - The task to be added.
taskAddOptions - Additional parameters for the operation

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

addAsync

public ServiceFuture addAsync(String jobId, TaskAddParameter task, TaskAddOptions taskAddOptions, final ServiceCallback serviceCallback)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task is to be added.
task - The task to be added.
taskAddOptions - Additional parameters for the operation
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

addCollection

public TaskAddCollectionResult addCollection(String jobId, List value)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task collection is to be added.
value - The collection of tasks to add. The maximum count of tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer tasks.

Returns:

the TaskAddCollectionResult object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

addCollection

public TaskAddCollectionResult addCollection(String jobId, List value, TaskAddCollectionOptions taskAddCollectionOptions)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task collection is to be added.
value - The collection of tasks to add. The maximum count of tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer tasks.
taskAddCollectionOptions - Additional parameters for the operation

Returns:

the TaskAddCollectionResult object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

addCollectionAsync

public Observable addCollectionAsync(String jobId, List value)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task collection is to be added.
value - The collection of tasks to add. The maximum count of tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer tasks.

Returns:

the observable to the TaskAddCollectionResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

addCollectionAsync

public ServiceFuture addCollectionAsync(String jobId, List value, final ServiceCallback serviceCallback)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task collection is to be added.
value - The collection of tasks to add. The maximum count of tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer tasks.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

addCollectionAsync

public Observable addCollectionAsync(String jobId, List value, TaskAddCollectionOptions taskAddCollectionOptions)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task collection is to be added.
value - The collection of tasks to add. The maximum count of tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer tasks.
taskAddCollectionOptions - Additional parameters for the operation

Returns:

the observable to the TaskAddCollectionResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

addCollectionAsync

public ServiceFuture addCollectionAsync(String jobId, List value, TaskAddCollectionOptions taskAddCollectionOptions, final ServiceCallback serviceCallback)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task collection is to be added.
value - The collection of tasks to add. The maximum count of tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer tasks.
taskAddCollectionOptions - Additional parameters for the operation
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

addCollectionWithServiceResponseAsync

public Observable> addCollectionWithServiceResponseAsync(String jobId, List value)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task collection is to be added.
value - The collection of tasks to add. The maximum count of tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer tasks.

Returns:

the observable to the TaskAddCollectionResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

addCollectionWithServiceResponseAsync

public Observable> addCollectionWithServiceResponseAsync(String jobId, List value, TaskAddCollectionOptions taskAddCollectionOptions)

Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same task IDs during a retry so that if the prior operation succeeded, the retry will not create extra tasks unexpectedly. If the response contains any tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only tasks that failed to add, and to omit tasks that were successfully added on the first attempt. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task collection is to be added.
value - The collection of tasks to add. The maximum count of tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer tasks.
taskAddCollectionOptions - Additional parameters for the operation

Returns:

the observable to the TaskAddCollectionResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

addWithServiceResponseAsync

public Observable> addWithServiceResponseAsync(String jobId, TaskAddParameter task)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task is to be added.
task - The task to be added.

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

addWithServiceResponseAsync

public Observable> addWithServiceResponseAsync(String jobId, TaskAddParameter task, TaskAddOptions taskAddOptions)

Adds a task to the specified job. The maximum lifetime of a task from addition to completion is 180 days. If a task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.

Parameters:

jobId - The ID of the job to which the task is to be added.
task - The task to be added.
taskAddOptions - Additional parameters for the operation

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

delete

public void delete(String jobId, String taskId)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

Parameters:

jobId - The ID of the job from which to delete the task.
taskId - The ID of the task to delete.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

delete

public void delete(String jobId, String taskId, TaskDeleteOptions taskDeleteOptions)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

Parameters:

jobId - The ID of the job from which to delete the task.
taskId - The ID of the task to delete.
taskDeleteOptions - Additional parameters for the operation

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

deleteAsync

public Observable deleteAsync(String jobId, String taskId)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

Parameters:

jobId - The ID of the job from which to delete the task.
taskId - The ID of the task to delete.

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

deleteAsync

public ServiceFuture deleteAsync(String jobId, String taskId, final ServiceCallback serviceCallback)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

Parameters:

jobId - The ID of the job from which to delete the task.
taskId - The ID of the task to delete.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

deleteAsync

public Observable deleteAsync(String jobId, String taskId, TaskDeleteOptions taskDeleteOptions)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

Parameters:

jobId - The ID of the job from which to delete the task.
taskId - The ID of the task to delete.
taskDeleteOptions - Additional parameters for the operation

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

deleteAsync

public ServiceFuture deleteAsync(String jobId, String taskId, TaskDeleteOptions taskDeleteOptions, final ServiceCallback serviceCallback)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

Parameters:

jobId - The ID of the job from which to delete the task.
taskId - The ID of the task to delete.
taskDeleteOptions - Additional parameters for the operation
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

deleteWithServiceResponseAsync

public Observable> deleteWithServiceResponseAsync(String jobId, String taskId)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

Parameters:

jobId - The ID of the job from which to delete the task.
taskId - The ID of the task to delete.

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

deleteWithServiceResponseAsync

public Observable> deleteWithServiceResponseAsync(String jobId, String taskId, TaskDeleteOptions taskDeleteOptions)

Deletes a task from the specified job. When a task is deleted, all of the files in its directory on the compute node where it ran are also deleted (regardless of the retention time). For multi-instance tasks, the delete task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.

Parameters:

jobId - The ID of the job from which to delete the task.
taskId - The ID of the task to delete.
taskDeleteOptions - Additional parameters for the operation

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

get

public CloudTask get(String jobId, String taskId)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job that contains the task.
taskId - The ID of the task to get information about.

Returns:

the CloudTask object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

get

public CloudTask get(String jobId, String taskId, TaskGetOptions taskGetOptions)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job that contains the task.
taskId - The ID of the task to get information about.
taskGetOptions - Additional parameters for the operation

Returns:

the CloudTask object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

getAsync

public Observable getAsync(String jobId, String taskId)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job that contains the task.
taskId - The ID of the task to get information about.

Returns:

the observable to the CloudTask object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

getAsync

public ServiceFuture getAsync(String jobId, String taskId, final ServiceCallback serviceCallback)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job that contains the task.
taskId - The ID of the task to get information about.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

getAsync

public Observable getAsync(String jobId, String taskId, TaskGetOptions taskGetOptions)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job that contains the task.
taskId - The ID of the task to get information about.
taskGetOptions - Additional parameters for the operation

Returns:

the observable to the CloudTask object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

getAsync

public ServiceFuture getAsync(String jobId, String taskId, TaskGetOptions taskGetOptions, final ServiceCallback serviceCallback)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job that contains the task.
taskId - The ID of the task to get information about.
taskGetOptions - Additional parameters for the operation
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

getWithServiceResponseAsync

public Observable> getWithServiceResponseAsync(String jobId, String taskId)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job that contains the task.
taskId - The ID of the task to get information about.

Returns:

the observable to the CloudTask object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

getWithServiceResponseAsync

public Observable> getWithServiceResponseAsync(String jobId, String taskId, TaskGetOptions taskGetOptions)

Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job that contains the task.
taskId - The ID of the task to get information about.
taskGetOptions - Additional parameters for the operation

Returns:

the observable to the CloudTask object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

list

public PagedList list(final String jobId)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job.

Returns:

the PagedList<CloudTask> object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

list

public PagedList list(final String jobId, final TaskListOptions taskListOptions)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job.
taskListOptions - Additional parameters for the operation

Returns:

the PagedList<CloudTask> object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

listAsync

public Observable> listAsync(final String jobId)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job.

Returns:

the observable to the PagedList<CloudTask> object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listAsync

public ServiceFuture> listAsync(final String jobId, final ListOperationCallback serviceCallback)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listAsync

public Observable> listAsync(final String jobId, final TaskListOptions taskListOptions)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job.
taskListOptions - Additional parameters for the operation

Returns:

the observable to the PagedList<CloudTask> object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listAsync

public ServiceFuture> listAsync(final String jobId, final TaskListOptions taskListOptions, final ListOperationCallback serviceCallback)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job.
taskListOptions - Additional parameters for the operation
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listNext

public PagedList listNext(final String nextPageLink)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

nextPageLink - The NextLink from the previous successful call to List operation.

Returns:

the PagedList<CloudTask> object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

listNext

public PagedList listNext(final String nextPageLink, final TaskListNextOptions taskListNextOptions)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

nextPageLink - The NextLink from the previous successful call to List operation.
taskListNextOptions - Additional parameters for the operation

Returns:

the PagedList<CloudTask> object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

listNextAsync

public Observable> listNextAsync(final String nextPageLink)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

nextPageLink - The NextLink from the previous successful call to List operation.

Returns:

the observable to the PagedList<CloudTask> object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listNextAsync

public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

nextPageLink - The NextLink from the previous successful call to List operation.
serviceFuture - the ServiceFuture object tracking the Retrofit calls
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listNextAsync

public Observable> listNextAsync(final String nextPageLink, final TaskListNextOptions taskListNextOptions)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

nextPageLink - The NextLink from the previous successful call to List operation.
taskListNextOptions - Additional parameters for the operation

Returns:

the observable to the PagedList<CloudTask> object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listNextAsync

public ServiceFuture> listNextAsync(final String nextPageLink, final TaskListNextOptions taskListNextOptions, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

nextPageLink - The NextLink from the previous successful call to List operation.
taskListNextOptions - Additional parameters for the operation
serviceFuture - the ServiceFuture object tracking the Retrofit calls
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listNextWithServiceResponseAsync

public Observable, TaskListHeaders>> listNextWithServiceResponseAsync(final String nextPageLink)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

nextPageLink - The NextLink from the previous successful call to List operation.

Returns:

the observable to the PagedList<CloudTask> object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listNextWithServiceResponseAsync

public Observable, TaskListHeaders>> listNextWithServiceResponseAsync(final String nextPageLink, final TaskListNextOptions taskListNextOptions)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

nextPageLink - The NextLink from the previous successful call to List operation.
taskListNextOptions - Additional parameters for the operation

Returns:

the observable to the PagedList<CloudTask> object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listSubtasks

public CloudTaskListSubtasksResult listSubtasks(String jobId, String taskId)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

Parameters:

jobId - The ID of the job.
taskId - The ID of the task.

Returns:

the CloudTaskListSubtasksResult object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

listSubtasks

public CloudTaskListSubtasksResult listSubtasks(String jobId, String taskId, TaskListSubtasksOptions taskListSubtasksOptions)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

Parameters:

jobId - The ID of the job.
taskId - The ID of the task.
taskListSubtasksOptions - Additional parameters for the operation

Returns:

the CloudTaskListSubtasksResult object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

listSubtasksAsync

public Observable listSubtasksAsync(String jobId, String taskId)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

Parameters:

jobId - The ID of the job.
taskId - The ID of the task.

Returns:

the observable to the CloudTaskListSubtasksResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listSubtasksAsync

public ServiceFuture listSubtasksAsync(String jobId, String taskId, final ServiceCallback serviceCallback)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

Parameters:

jobId - The ID of the job.
taskId - The ID of the task.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listSubtasksAsync

public Observable listSubtasksAsync(String jobId, String taskId, TaskListSubtasksOptions taskListSubtasksOptions)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

Parameters:

jobId - The ID of the job.
taskId - The ID of the task.
taskListSubtasksOptions - Additional parameters for the operation

Returns:

the observable to the CloudTaskListSubtasksResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listSubtasksAsync

public ServiceFuture listSubtasksAsync(String jobId, String taskId, TaskListSubtasksOptions taskListSubtasksOptions, final ServiceCallback serviceCallback)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

Parameters:

jobId - The ID of the job.
taskId - The ID of the task.
taskListSubtasksOptions - Additional parameters for the operation
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listSubtasksWithServiceResponseAsync

public Observable> listSubtasksWithServiceResponseAsync(String jobId, String taskId)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

Parameters:

jobId - The ID of the job.
taskId - The ID of the task.

Returns:

the observable to the CloudTaskListSubtasksResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listSubtasksWithServiceResponseAsync

public Observable> listSubtasksWithServiceResponseAsync(String jobId, String taskId, TaskListSubtasksOptions taskListSubtasksOptions)

Lists all of the subtasks that are associated with the specified multi-instance task. If the task is not a multi-instance task then this returns an empty collection.

Parameters:

jobId - The ID of the job.
taskId - The ID of the task.
taskListSubtasksOptions - Additional parameters for the operation

Returns:

the observable to the CloudTaskListSubtasksResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listWithServiceResponseAsync

public Observable, TaskListHeaders>> listWithServiceResponseAsync(final String jobId)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job.

Returns:

the observable to the PagedList<CloudTask> object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listWithServiceResponseAsync

public Observable, TaskListHeaders>> listWithServiceResponseAsync(final String jobId, final TaskListOptions taskListOptions)

Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.

Parameters:

jobId - The ID of the job.
taskListOptions - Additional parameters for the operation

Returns:

the observable to the PagedList<CloudTask> object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

reactivate

public void reactivate(String jobId, String taskId)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to reactivate.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

reactivate

public void reactivate(String jobId, String taskId, TaskReactivateOptions taskReactivateOptions)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to reactivate.
taskReactivateOptions - Additional parameters for the operation

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

reactivateAsync

public Observable reactivateAsync(String jobId, String taskId)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to reactivate.

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

reactivateAsync

public ServiceFuture reactivateAsync(String jobId, String taskId, final ServiceCallback serviceCallback)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to reactivate.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

reactivateAsync

public Observable reactivateAsync(String jobId, String taskId, TaskReactivateOptions taskReactivateOptions)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to reactivate.
taskReactivateOptions - Additional parameters for the operation

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

reactivateAsync

public ServiceFuture reactivateAsync(String jobId, String taskId, TaskReactivateOptions taskReactivateOptions, final ServiceCallback serviceCallback)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to reactivate.
taskReactivateOptions - Additional parameters for the operation
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

reactivateWithServiceResponseAsync

public Observable> reactivateWithServiceResponseAsync(String jobId, String taskId)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to reactivate.

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

reactivateWithServiceResponseAsync

public Observable> reactivateWithServiceResponseAsync(String jobId, String taskId, TaskReactivateOptions taskReactivateOptions)

Reactivates a task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a task eligible to be retried again up to its maximum retry count. The task's state is changed to active. As the task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a task is reactivated, its retry count is reset to 0. Reactivation will fail for tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the job has completed (or is terminating or deleting).

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to reactivate.
taskReactivateOptions - Additional parameters for the operation

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

terminate

public void terminate(String jobId, String taskId)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to terminate.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

terminate

public void terminate(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to terminate.
taskTerminateOptions - Additional parameters for the operation

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

terminateAsync

public Observable terminateAsync(String jobId, String taskId)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to terminate.

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

terminateAsync

public ServiceFuture terminateAsync(String jobId, String taskId, final ServiceCallback serviceCallback)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to terminate.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

terminateAsync

public Observable terminateAsync(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to terminate.
taskTerminateOptions - Additional parameters for the operation

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

terminateAsync

public ServiceFuture terminateAsync(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions, final ServiceCallback serviceCallback)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to terminate.
taskTerminateOptions - Additional parameters for the operation
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

terminateWithServiceResponseAsync

public Observable> terminateWithServiceResponseAsync(String jobId, String taskId)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to terminate.

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

terminateWithServiceResponseAsync

public Observable> terminateWithServiceResponseAsync(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions)

Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to terminate.
taskTerminateOptions - Additional parameters for the operation

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

update

public void update(String jobId, String taskId)

Updates the properties of the specified task.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to update.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

update

public void update(String jobId, String taskId, TaskConstraints constraints, TaskUpdateOptions taskUpdateOptions)

Updates the properties of the specified task.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to update.
constraints - Constraints that apply to this task. If omitted, the task is given the default constraints. For multi-instance tasks, updating the retention time applies only to the primary task and not subtasks.
taskUpdateOptions - Additional parameters for the operation

Throws:

IllegalArgumentException - thrown if parameters fail the validation
BatchErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

updateAsync

public Observable updateAsync(String jobId, String taskId)

Updates the properties of the specified task.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to update.

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

updateAsync

public ServiceFuture updateAsync(String jobId, String taskId, final ServiceCallback serviceCallback)

Updates the properties of the specified task.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to update.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

updateAsync

public Observable updateAsync(String jobId, String taskId, TaskConstraints constraints, TaskUpdateOptions taskUpdateOptions)

Updates the properties of the specified task.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to update.
constraints - Constraints that apply to this task. If omitted, the task is given the default constraints. For multi-instance tasks, updating the retention time applies only to the primary task and not subtasks.
taskUpdateOptions - Additional parameters for the operation

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

updateAsync

public ServiceFuture updateAsync(String jobId, String taskId, TaskConstraints constraints, TaskUpdateOptions taskUpdateOptions, final ServiceCallback serviceCallback)

Updates the properties of the specified task.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to update.
constraints - Constraints that apply to this task. If omitted, the task is given the default constraints. For multi-instance tasks, updating the retention time applies only to the primary task and not subtasks.
taskUpdateOptions - Additional parameters for the operation
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

updateWithServiceResponseAsync

public Observable> updateWithServiceResponseAsync(String jobId, String taskId)

Updates the properties of the specified task.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to update.

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

updateWithServiceResponseAsync

public Observable> updateWithServiceResponseAsync(String jobId, String taskId, TaskConstraints constraints, TaskUpdateOptions taskUpdateOptions)

Updates the properties of the specified task.

Parameters:

jobId - The ID of the job containing the task.
taskId - The ID of the task to update.
constraints - Constraints that apply to this task. If omitted, the task is given the default constraints. For multi-instance tasks, updating the retention time applies only to the primary task and not subtasks.
taskUpdateOptions - Additional parameters for the operation

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

Applies to