JobOperations Class

  • java.lang.Object
    • com.microsoft.azure.batch.JobOperations

Implements

public class JobOperations
implements IInheritedBehaviors

Performs job-related operations on an Azure Batch account.

Method Summary

Modifier and Type Method and Description
void createJob(JobAddParameter job)

Adds a job to the Batch account.

void createJob(JobAddParameter job, Iterable<BatchClientBehavior> additionalBehaviors)

Adds a job to the Batch account.

void createJob(String jobId, PoolInformation poolInfo)

Adds a job to the Batch account.

void createJob(String jobId, PoolInformation poolInfo, Iterable<BatchClientBehavior> additionalBehaviors)

Adds a job to the Batch account.

Collection<BatchClientBehavior> customBehaviors()

Gets a collection of behaviors that modify or customize requests to the Batch service.

void deleteJob(String jobId)

Deletes the specified job.

void deleteJob(String jobId, Iterable<BatchClientBehavior> additionalBehaviors)

Deletes the specified job.

void disableJob(String jobId, DisableJobOption disableJobOption)

Disables the specified job.

void disableJob(String jobId, DisableJobOption disableJobOption, Iterable<BatchClientBehavior> additionalBehaviors)

Disables the specified job.

void enableJob(String jobId)

Enables the specified job, allowing new tasks to run.

void enableJob(String jobId, Iterable<BatchClientBehavior> additionalBehaviors)

Enables the specified job, allowing new tasks to run.

CloudJob getJob(String jobId)

Gets the specified CloudJob.

CloudJob getJob(String jobId, DetailLevel detailLevel)

Gets the specified CloudJob.

CloudJob getJob(String jobId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors)

Gets the specified CloudJob.

TaskCounts getTaskCounts(String jobId)

Gets the task counts for the specified job.

TaskCounts getTaskCounts(String jobId, Iterable<BatchClientBehavior> additionalBehaviors)

Gets the task counts for the specified job.

TaskCountsResult getTaskCountsResult(String jobId)

Gets the task counts result for the specified job.

TaskCountsResult getTaskCountsResult(String jobId, Iterable<BatchClientBehavior> additionalBehaviors)

Gets the task counts result for the specified job.

TaskSlotCounts getTaskSlotCounts(String jobId)

Gets the task slot counts for the specified job.

TaskSlotCounts getTaskSlotCounts(String jobId, Iterable<BatchClientBehavior> additionalBehaviors)

Gets the task slot counts for the specified job.

com.microsoft.azure.PagedList<CloudJob> listJobs()

Lists the CloudJob in the Batch account.

com.microsoft.azure.PagedList<CloudJob> listJobs(DetailLevel detailLevel)

Lists the CloudJob in the Batch account.

com.microsoft.azure.PagedList<CloudJob> listJobs(DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors)

Lists the CloudJob in the Batch account.

com.microsoft.azure.PagedList<CloudJob> listJobs(String jobScheduleId)

Lists the CloudJob created under the specified job schedule.

com.microsoft.azure.PagedList<CloudJob> listJobs(String jobScheduleId, DetailLevel detailLevel)

Lists the CloudJob created under the specified job schedule.

com.microsoft.azure.PagedList<CloudJob> listJobs(String jobScheduleId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors)

Lists the CloudJob created under the specified jobSchedule.

com.microsoft.azure.PagedList<JobPreparationAndReleaseTaskExecutionInformation> listPreparationAndReleaseTaskStatus(String jobId)

Lists the status of JobPreparationTask and JobReleaseTask tasks for the specified job.

com.microsoft.azure.PagedList<JobPreparationAndReleaseTaskExecutionInformation> listPreparationAndReleaseTaskStatus(String jobId, Iterable<BatchClientBehavior> additionalBehaviors)

Lists the status of JobPreparationTask and JobReleaseTask tasks for the specified job.

void patchJob(String jobId, JobPatchParameter jobPatchParameter)

Updates the specified job.

void patchJob(String jobId, JobPatchParameter jobPatchParameter, Iterable<BatchClientBehavior> additionalBehaviors)

Updates the specified job.

void patchJob(String jobId, OnAllTasksComplete onAllTasksComplete)

Updates the specified job.

void patchJob(String jobId, PoolInformation poolInfo)

Updates the specified job.

void patchJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List<MetadataItem> metadata)

Updates the specified job.

void patchJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors)

Updates the specified job.

void terminateJob(String jobId)

Terminates the specified job, marking it as completed.

void terminateJob(String jobId, String terminateReason)

Terminates the specified job, marking it as completed.

void terminateJob(String jobId, String terminateReason, Iterable<BatchClientBehavior> additionalBehaviors)

Terminates the specified job, marking it as completed.

void updateJob(String jobId, JobUpdateParameter param)
void updateJob(String jobId, JobUpdateParameter param, Iterable<BatchClientBehavior> additionalBehaviors)

Updates the specified job This method performs a full replace of all updatable properties of the job.

void updateJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List<MetadataItem> metadata)

Updates the specified job.

void updateJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors)

Updates the specified job.

IInheritedBehaviors withCustomBehaviors(Collection<BatchClientBehavior> behaviors)

Sets a collection of behaviors that modify or customize requests to the Batch service.

Methods inherited from java.lang.Object

Method Details

createJob

public void createJob(JobAddParameter job)

Adds a job to the Batch account.

Parameters:

job - The job to be added.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

createJob

public void createJob(JobAddParameter job, Iterable additionalBehaviors)

Adds a job to the Batch account.

Parameters:

job - The job to be added.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

createJob

public void createJob(String jobId, PoolInformation poolInfo)

Adds a job to the Batch account.

Parameters:

jobId - The ID of the job to be added.
poolInfo - Specifies how a job should be assigned to a pool.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

createJob

public void createJob(String jobId, PoolInformation poolInfo, Iterable additionalBehaviors)

Adds a job to the Batch account.

Parameters:

jobId - The ID of the job to be added.
poolInfo - Specifies how a job should be assigned to a pool.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

customBehaviors

public Collection customBehaviors()

Gets a collection of behaviors that modify or customize requests to the Batch service.

Returns:

A collection of BatchClientBehavior instances.

deleteJob

public void deleteJob(String jobId)

Deletes the specified job.

Parameters:

jobId - The ID of the job.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

deleteJob

public void deleteJob(String jobId, Iterable additionalBehaviors)

Deletes the specified job.

Parameters:

jobId - The ID of the job.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

disableJob

public void disableJob(String jobId, DisableJobOption disableJobOption)

Disables the specified job. Disabled jobs do not run new tasks, but may be re-enabled later.

Parameters:

jobId - The ID of the job.
disableJobOption - Specifies what to do with running tasks associated with the job.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

disableJob

public void disableJob(String jobId, DisableJobOption disableJobOption, Iterable additionalBehaviors)

Disables the specified job. Disabled jobs do not run new tasks, but may be re-enabled later.

Parameters:

jobId - The ID of the job.
disableJobOption - Specifies what to do with running tasks associated with the job.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

enableJob

public void enableJob(String jobId)

Enables the specified job, allowing new tasks to run.

Parameters:

jobId - The ID of the job.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

enableJob

public void enableJob(String jobId, Iterable additionalBehaviors)

Enables the specified job, allowing new tasks to run.

Parameters:

jobId - The ID of the job.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getJob

public CloudJob getJob(String jobId)

Gets the specified CloudJob.

Parameters:

jobId - The ID of the job to get.

Returns:

A CloudJob containing information about the specified Azure Batch job.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getJob

public CloudJob getJob(String jobId, DetailLevel detailLevel)

Gets the specified CloudJob.

Parameters:

jobId - The ID of the job to get.
detailLevel - A DetailLevel used for controlling which properties are retrieved from the service.

Returns:

A CloudJob containing information about the specified Azure Batch job.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getJob

public CloudJob getJob(String jobId, DetailLevel detailLevel, Iterable additionalBehaviors)

Gets the specified CloudJob.

Parameters:

jobId - The ID of the job to get.
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.

Returns:

A CloudJob containing information about the specified Azure Batch job.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getTaskCounts

public TaskCounts getTaskCounts(String jobId)

Gets the task counts for the specified job. Task counts provide a count of the tasks by active, running or completed task state, and a count of tasks which succeeded or failed. Tasks in the preparing state are counted as running.

Parameters:

jobId - The ID of the job.

Returns:

the TaskCounts object if successful.

Throws:

BatchErrorException - thrown if the request is rejected by server

IOException

- thrown if the request is rejected by server

getTaskCounts

public TaskCounts getTaskCounts(String jobId, Iterable additionalBehaviors)

Gets the task counts for the specified job. Task counts provide a count of the tasks by active, running or completed task state, and a count of tasks which succeeded or failed. Tasks in the preparing state are counted as running.

Parameters:

jobId - The ID of the job.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

the TaskCounts object if successful.

Throws:

BatchErrorException - thrown if the request is rejected by server

IOException

- thrown if the request is rejected by server

getTaskCountsResult

public TaskCountsResult getTaskCountsResult(String jobId)

Gets the task counts result for the specified job. The result includes both task counts and task slot counts. Each counts object provides a count of the tasks by active, running or completed task state, and a count of tasks which succeeded or failed. Tasks in the preparing state are counted as running.

Parameters:

jobId - The ID of the job.

Returns:

the TaskCountsResult object if successful.

Throws:

BatchErrorException - thrown if the request is rejected by server

IOException

- thrown if the request is rejected by server

getTaskCountsResult

public TaskCountsResult getTaskCountsResult(String jobId, Iterable additionalBehaviors)

Gets the task counts result for the specified job. The result includes both task counts and task slot counts. Each counts object provides a count of the tasks by active, running or completed task state, and a count of tasks which succeeded or failed. Tasks in the preparing state are counted as running.

Parameters:

jobId - The ID of the job.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

the TaskCountsResult object if successful.

Throws:

BatchErrorException - thrown if the request is rejected by server

IOException

- thrown if the request is rejected by server

getTaskSlotCounts

public TaskSlotCounts getTaskSlotCounts(String jobId)

Gets the task slot counts for the specified job. Task slot counts provide a count of the tasks by active, running or completed task state, and a count of tasks which succeeded or failed. Tasks in the preparing state are counted as running.

Parameters:

jobId - The ID of the job.

Returns:

the TaskSlotCounts object if successful.

Throws:

BatchErrorException - thrown if the request is rejected by server

IOException

- thrown if the request is rejected by server

getTaskSlotCounts

public TaskSlotCounts getTaskSlotCounts(String jobId, Iterable additionalBehaviors)

Gets the task slot counts for the specified job. Task slot counts provide a count of the tasks by active, running or completed task state, and a count of tasks which succeeded or failed. Tasks in the preparing state are counted as running.

Parameters:

jobId - The ID of the job.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

the TaskSlotCounts object if successful.

Throws:

BatchErrorException - thrown if the request is rejected by server

IOException

- thrown if the request is rejected by server

listJobs

public PagedList listJobs()

Lists the CloudJob in the Batch account.

Returns:

A list of CloudJob objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listJobs

public PagedList listJobs(DetailLevel detailLevel)

Lists the CloudJob in the Batch account.

Parameters:

detailLevel - A DetailLevel used for filtering the list and for controlling which properties are retrieved from the service.

Returns:

A list of CloudJob objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listJobs

public PagedList listJobs(DetailLevel detailLevel, Iterable additionalBehaviors)

Lists the CloudJob in the Batch account.

Parameters:

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.

Returns:

A list of CloudJob objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listJobs

public PagedList listJobs(String jobScheduleId)

Lists the CloudJob created under the specified job schedule.

Parameters:

jobScheduleId - The ID of job schedule.

Returns:

A list of CloudJob objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listJobs

public PagedList listJobs(String jobScheduleId, DetailLevel detailLevel)

Lists the CloudJob created under the specified job schedule.

Parameters:

jobScheduleId - The ID of job schedule.
detailLevel - A DetailLevel used for filtering the list and for controlling which properties are retrieved from the service.

Returns:

A list of CloudJob objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listJobs

public PagedList listJobs(String jobScheduleId, DetailLevel detailLevel, Iterable additionalBehaviors)

Lists the CloudJob created under the specified jobSchedule.

Parameters:

jobScheduleId - The ID of jobSchedule.
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.

Returns:

A list of CloudJob objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listPreparationAndReleaseTaskStatus

public PagedList listPreparationAndReleaseTaskStatus(String jobId)

Lists the status of JobPreparationTask and JobReleaseTask tasks for the specified job.

Parameters:

jobId - The ID of the job.

Returns:

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listPreparationAndReleaseTaskStatus

public PagedList listPreparationAndReleaseTaskStatus(String jobId, Iterable additionalBehaviors)

Lists the status of JobPreparationTask and JobReleaseTask tasks for the specified job.

Parameters:

jobId - The ID of the job.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

patchJob

public void patchJob(String jobId, JobPatchParameter jobPatchParameter)

Updates the specified job. This method only replaces the properties specified with non-null values.

Parameters:

jobId - The ID of the job.
jobPatchParameter - The set of changes to be made to a job.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

patchJob

public void patchJob(String jobId, JobPatchParameter jobPatchParameter, Iterable additionalBehaviors)

Updates the specified job. This method only replaces the properties specified with non-null values.

Parameters:

jobId - The ID of the job.
jobPatchParameter - The parameter to update the job.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

patchJob

public void patchJob(String jobId, OnAllTasksComplete onAllTasksComplete)

Updates the specified job. This method only replaces the properties specified with non-null values.

Parameters:

jobId - The ID of the job.
onAllTasksComplete - Specifies an action the Batch service should take when all tasks in the job are in the completed state.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

patchJob

public void patchJob(String jobId, PoolInformation poolInfo)

Updates the specified job. This method only replaces the properties specified with non-null values.

Parameters:

jobId - The ID of the job.
poolInfo - The pool on which the Batch service runs the job's tasks. You may change the pool for a job only when the job is disabled. If you specify an autoPoolSpecification specification in the poolInfo, only the keepAlive property can be updated, and then only if the auto pool has a poolLifetimeOption of job. If null, the job continues to run on its current pool.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

patchJob

public void patchJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List metadata)

Updates the specified job. This method only replaces the properties specified with non-null values.

Parameters:

jobId - The ID of the job.
poolInfo - The pool on which the Batch service runs the job's tasks. You may change the pool for a job only when the job is disabled. If you specify an autoPoolSpecification specification in the poolInfo, only the keepAlive property can be updated, and then only if the auto pool has a poolLifetimeOption of job. If null, the job continues to run on its current pool.
priority - The priority of the job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If null, the priority of the job is left unchanged.
constraints - The execution constraints for the job. If null, the existing execution constraints are left unchanged.
onAllTasksComplete - Specifies an action the Batch service should take when all tasks in the job are in the completed state.
metadata - A list of name-value pairs associated with the job as metadata. If null, the existing job metadata is left unchanged.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

patchJob

public void patchJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List metadata, Iterable additionalBehaviors)

Updates the specified job. This method only replaces the properties specified with non-null values.

Parameters:

jobId - The ID of the job.
poolInfo - The pool on which the Batch service runs the job's tasks. You may change the pool for a job only when the job is disabled. If you specify an autoPoolSpecification specification in the poolInfo, only the keepAlive property can be updated, and then only if the auto pool has a poolLifetimeOption of job. If null, the job continues to run on its current pool.
priority - The priority of the job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If null, the priority of the job is left unchanged.
constraints - The execution constraints for the job. If null, the existing execution constraints are left unchanged.
onAllTasksComplete - Specifies an action the Batch service should take when all tasks in the job are in the completed state.
metadata - A list of name-value pairs associated with the job as metadata. If null, the existing job metadata is left unchanged.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

terminateJob

public void terminateJob(String jobId)

Terminates the specified job, marking it as completed.

Parameters:

jobId - The ID of the job.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

terminateJob

public void terminateJob(String jobId, String terminateReason)

Terminates the specified job, marking it as completed.

Parameters:

jobId - The ID of the job.
terminateReason - The message to describe the reason the job has terminated. This text will appear when you call terminateReason().

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

terminateJob

public void terminateJob(String jobId, String terminateReason, Iterable additionalBehaviors)

Terminates the specified job, marking it as completed.

Parameters:

jobId - The ID of the job.
terminateReason - The message to describe the reason the job has terminated. This text will appear when you call terminateReason().
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

updateJob

public void updateJob(String jobId, JobUpdateParameter param)

Parameters:

jobId
param

Throws:

updateJob

public void updateJob(String jobId, JobUpdateParameter param, Iterable additionalBehaviors)

Updates the specified job This method performs a full replace of all updatable properties of the job. For example, if the constraints parameter is null, then the Batch service removes the job's existing constraints and replaces them with the default constraints.

Parameters:

jobId - The job to be updated.
param - Job Update parameters
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

updateJob

public void updateJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List metadata)

Updates the specified job. This method performs a full replace of all updatable properties of the job. For example, if the constraints parameter is null, then the Batch service removes the job's existing constraints and replaces them with the default constraints.

Parameters:

jobId - The ID of the job.
poolInfo - The pool on which the Batch service runs the job's tasks. You may change the pool for a job only when the job is disabled. If you specify an autoPoolSpecification specification in the poolInfo, only the keepAlive property can be updated, and then only if the auto pool has a poolLifetimeOption of job.
priority - The priority of the job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If null, it is set to the default value 0.
constraints - The execution constraints for the job. If null, the constraints are cleared.
onAllTasksComplete - Specifies an action the Batch service should take when all tasks in the job are in the completed state.
metadata - A list of name-value pairs associated with the job as metadata. If null, it takes the default value of an empty list; in effect, any existing metadata is deleted.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

updateJob

public void updateJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List metadata, Iterable additionalBehaviors)

Updates the specified job. This method performs a full replace of all updatable properties of the job. For example, if the constraints parameter is null, then the Batch service removes the job's existing constraints and replaces them with the default constraints.

Parameters:

jobId - The ID of the job.
poolInfo - The pool on which the Batch service runs the job's tasks. You may change the pool for a job only when the job is disabled. If you specify an autoPoolSpecification specification in the poolInfo, only the keepAlive property can be updated, and then only if the auto pool has a poolLifetimeOption of job.
priority - The priority of the job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If null, it is set to the default value 0.
constraints - The execution constraints for the job. If null, the constraints are cleared.
onAllTasksComplete - Specifies an action the Batch service should take when all tasks in the job are in the completed state.
metadata - A list of name-value pairs associated with the job as metadata. If null, it takes the default value of an empty list; in effect, any existing metadata is deleted.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

withCustomBehaviors

public IInheritedBehaviors withCustomBehaviors(Collection behaviors)

Sets a collection of behaviors that modify or customize requests to the Batch service.

Parameters:

behaviors - The collection of BatchClientBehavior instances.

Returns:

The current instance.

Applies to