public class TaskOperations extends Object implements IInheritedBehaviors
| Modifier and Type | Method and Description |
|---|---|
void |
createTask(String jobId,
TaskAddParameter taskToAdd)
Adds a single task to a job.
|
void |
createTask(String jobId,
TaskAddParameter taskToAdd,
Iterable<BatchClientBehavior> additionalBehaviors)
Adds a single task to a job.
|
void |
createTasks(String jobId,
List<TaskAddParameter> taskList)
Adds multiple tasks to a job.
|
void |
createTasks(String jobId,
List<TaskAddParameter> taskList,
Iterable<BatchClientBehavior> additionalBehaviors)
Adds multiple tasks to a job.
|
Collection<BatchClientBehavior> |
customBehaviors()
Gets a collection of behaviors that modify or customize requests to the Batch service.
|
void |
deleteTask(String jobId,
String taskId)
Deletes the specified task.
|
void |
deleteTask(String jobId,
String taskId,
Iterable<BatchClientBehavior> additionalBehaviors)
Deletes the specified task.
|
CloudTask |
getTask(String jobId,
String taskId)
Gets the specified
CloudTask. |
CloudTask |
getTask(String jobId,
String taskId,
DetailLevel detailLevel)
Gets the specified
CloudTask. |
CloudTask |
getTask(String jobId,
String taskId,
DetailLevel detailLevel,
Iterable<BatchClientBehavior> additionalBehaviors)
Gets the specified
CloudTask. |
List<SubtaskInformation> |
listSubtasks(String jobId,
String taskId)
Lists the
subtasks of the specified task. |
List<SubtaskInformation> |
listSubtasks(String jobId,
String taskId,
DetailLevel detailLevel)
Lists the
subtasks of the specified task. |
List<SubtaskInformation> |
listSubtasks(String jobId,
String taskId,
DetailLevel detailLevel,
Iterable<BatchClientBehavior> additionalBehaviors)
Lists the
subtasks of the specified task. |
List<CloudTask> |
listTasks(String jobId)
Lists the
tasks of the specified job. |
List<CloudTask> |
listTasks(String jobId,
DetailLevel detailLevel)
Lists the
tasks of the specified job. |
List<CloudTask> |
listTasks(String jobId,
DetailLevel detailLevel,
Iterable<BatchClientBehavior> additionalBehaviors)
Lists the
tasks of the specified job. |
void |
reactivateTask(String jobId,
String taskId)
Reactivates a task, allowing it to run again even if its retry count has been exhausted.
|
void |
reactivateTask(String jobId,
String taskId,
Iterable<BatchClientBehavior> additionalBehaviors)
Reactivates a task, allowing it to run again even if its retry count has been exhausted.
|
void |
terminateTask(String jobId,
String taskId)
Terminates the specified task.
|
void |
terminateTask(String jobId,
String taskId,
Iterable<BatchClientBehavior> additionalBehaviors)
Terminates the specified task.
|
void |
updateTask(String jobId,
String taskId,
TaskConstraints constraints)
Updates the specified task.
|
void |
updateTask(String jobId,
String taskId,
TaskConstraints constraints,
Iterable<BatchClientBehavior> additionalBehaviors)
Updates the specified task.
|
IInheritedBehaviors |
withCustomBehaviors(Collection<BatchClientBehavior> behaviors)
Sets a collection of behaviors that modify or customize requests to the Batch service.
|
public Collection<BatchClientBehavior> customBehaviors()
customBehaviors in interface IInheritedBehaviorsBatchClientBehavior instances.public IInheritedBehaviors withCustomBehaviors(Collection<BatchClientBehavior> behaviors)
withCustomBehaviors in interface IInheritedBehaviorsbehaviors - The collection of BatchClientBehavior instances.public void createTask(String jobId, TaskAddParameter taskToAdd) throws BatchErrorException, IOException
jobId - The ID of the job to which to add the task.taskToAdd - The task to add.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void createTask(String jobId, TaskAddParameter taskToAdd, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
jobId - The ID of the job to which to add the task.taskToAdd - The task to add.additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void createTasks(String jobId, List<TaskAddParameter> taskList) throws BatchErrorException, IOException, InterruptedException
jobId - The ID of the job to which to add the task.taskList - A list of tasks to add.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.InterruptedException - Exception thrown if any thread has interrupted the current thread.public void createTasks(String jobId, List<TaskAddParameter> taskList, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException, InterruptedException
jobId - The ID of the job to which to add the task.taskList - A list of tasks to add.additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.InterruptedException - Exception thrown if any thread has interrupted the current thread.public List<CloudTask> listTasks(String jobId) throws BatchErrorException, IOException
tasks of the specified job.jobId - The ID of the job.CloudTask objects.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public List<CloudTask> listTasks(String jobId, DetailLevel detailLevel) throws BatchErrorException, IOException
tasks of the specified job.jobId - The ID of the job.detailLevel - A DetailLevel used for filtering the list and for controlling which properties are retrieved from the service.CloudTask objects.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public List<CloudTask> listTasks(String jobId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
tasks of the specified job.jobId - The ID of the job.detailLevel - A DetailLevel used for filtering the list and for controlling which properties are retrieved from the service.additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.CloudTask objects.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public List<SubtaskInformation> listSubtasks(String jobId, String taskId) throws BatchErrorException, IOException
subtasks of the specified task.jobId - The ID of the job containing the task.taskId - The ID of the task.SubtaskInformation objects.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public List<SubtaskInformation> listSubtasks(String jobId, String taskId, DetailLevel detailLevel) throws BatchErrorException, IOException
subtasks of the specified task.jobId - The ID of the job containing the task.taskId - The ID of the task.detailLevel - A DetailLevel used for controlling which properties are retrieved from the service.SubtaskInformation objects.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public List<SubtaskInformation> listSubtasks(String jobId, String taskId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
subtasks of the specified task.jobId - The ID of the job containing the task.taskId - The ID of the task.detailLevel - A DetailLevel used for controlling which properties are retrieved from the service.additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.SubtaskInformation objects.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void deleteTask(String jobId, String taskId) throws BatchErrorException, IOException
jobId - The ID of the job containing the task.taskId - The ID of the task.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void deleteTask(String jobId, String taskId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
jobId - The ID of the job containing the task.taskId - The ID of the task.additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public CloudTask getTask(String jobId, String taskId) throws BatchErrorException, IOException
CloudTask.jobId - The ID of the job containing the task.taskId - The ID of the task.CloudTask containing information about the specified Azure Batch task.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public CloudTask getTask(String jobId, String taskId, DetailLevel detailLevel) throws BatchErrorException, IOException
CloudTask.jobId - The ID of the job containing the task.taskId - The ID of the task.detailLevel - A DetailLevel used for controlling which properties are retrieved from the service.CloudTask containing information about the specified Azure Batch task.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public CloudTask getTask(String jobId, String taskId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
CloudTask.jobId - The ID of the job containing the task.taskId - The ID of the task.detailLevel - A DetailLevel used for controlling which properties are retrieved from the service.additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.CloudTask containing information about the specified Azure Batch task.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void updateTask(String jobId, String taskId, TaskConstraints constraints) throws BatchErrorException, IOException
jobId - The ID of the job containing the task.taskId - The ID of the task.constraints - Constraints that apply to this task. If null, the task is given the default constraints.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void updateTask(String jobId, String taskId, TaskConstraints constraints, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
jobId - The ID of the job containing the task.taskId - The ID of the task.constraints - Constraints that apply to this task. If null, the task is given the default constraints.additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void terminateTask(String jobId, String taskId) throws BatchErrorException, IOException
jobId - The ID of the job containing the task.taskId - The ID of the task.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void terminateTask(String jobId, String taskId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
jobId - The ID of the job containing the task.taskId - The ID of the task.additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void reactivateTask(String jobId, String taskId) throws BatchErrorException, IOException
jobId - The ID of the job containing the task.taskId - The ID of the task.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.public void reactivateTask(String jobId, String taskId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException
jobId - The ID of the job containing the task.taskId - The ID of the task.additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.BatchErrorException - Exception thrown when an error response is received from the Batch service.IOException - Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.Copyright © 2019. All rights reserved.