JobPatchParameter Class

  • java.lang.Object
    • com.microsoft.azure.batch.protocol.models.JobPatchParameter

public class JobPatchParameter

The set of changes to be made to a Job.

Constructor Summary

Constructor Description
JobPatchParameter()

Method Summary

Modifier and Type Method and Description
Boolean allowTaskPreemption()

Get if the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job.

JobConstraints constraints()

Get if omitted, the existing execution constraints are left unchanged.

Integer maxParallelTasks()

Get the value of maxParallelTasks must be -1 or greater than 0 if specified.

List<MetadataItem> metadata()

Get if omitted, the existing Job metadata is left unchanged.

JobNetworkConfiguration networkConfiguration()

Get the networkConfiguration value.

OnAllTasksComplete onAllTasksComplete()

Get if omitted, the completion behavior is left unchanged.

PoolInformation poolInfo()

Get you may change the Pool for a Job only when the Job is disabled.

Integer priority()

Get priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority.

JobPatchParameter withAllowTaskPreemption(Boolean allowTaskPreemption)

Set if the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job.

JobPatchParameter withConstraints(JobConstraints constraints)

Set if omitted, the existing execution constraints are left unchanged.

JobPatchParameter withMaxParallelTasks(Integer maxParallelTasks)

Set the value of maxParallelTasks must be -1 or greater than 0 if specified.

JobPatchParameter withMetadata(List<MetadataItem> metadata)

Set if omitted, the existing Job metadata is left unchanged.

JobPatchParameter withNetworkConfiguration(JobNetworkConfiguration networkConfiguration)

Set the networkConfiguration value.

JobPatchParameter withOnAllTasksComplete(OnAllTasksComplete onAllTasksComplete)

Set if omitted, the completion behavior is left unchanged.

JobPatchParameter withPoolInfo(PoolInformation poolInfo)

Set you may change the Pool for a Job only when the Job is disabled.

JobPatchParameter withPriority(Integer priority)

Set priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority.

Methods inherited from java.lang.Object

Constructor Details

JobPatchParameter

public JobPatchParameter()

Method Details

allowTaskPreemption

public Boolean allowTaskPreemption()

Get if the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.

Returns:

the allowTaskPreemption value

constraints

public JobConstraints constraints()

Get if omitted, the existing execution constraints are left unchanged.

Returns:

the constraints value

maxParallelTasks

public Integer maxParallelTasks()

Get the value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API.

Returns:

the maxParallelTasks value

metadata

public List metadata()

Get if omitted, the existing Job metadata is left unchanged.

Returns:

the metadata value

networkConfiguration

public JobNetworkConfiguration networkConfiguration()

Get the networkConfiguration value.

Returns:

the networkConfiguration value

onAllTasksComplete

public OnAllTasksComplete onAllTasksComplete()

Get if omitted, the completion behavior is left unchanged. You may not change the value from terminatejob to noaction - that is, once you have engaged automatic Job termination, you cannot turn it off again. If you try to do this, the request fails with an 'invalid property value' error response; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). Possible values include: 'noAction', 'terminateJob'.

Returns:

the onAllTasksComplete value

poolInfo

public PoolInformation poolInfo()

Get you may change the Pool for a Job only when the Job is disabled. The Patch Job call will fail if you include the poolInfo element and the Job is not disabled. If you specify an autoPoolSpecification in the poolInfo, only the keepAlive property of the autoPoolSpecification can be updated, and then only if the autoPoolSpecification has a poolLifetimeOption of Job (other job properties can be updated as normal). If omitted, the Job continues to run on its current Pool.

Returns:

the poolInfo value

priority

public Integer priority()

Get priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If omitted, the priority of the Job is left unchanged.

Returns:

the priority value

withAllowTaskPreemption

public JobPatchParameter withAllowTaskPreemption(Boolean allowTaskPreemption)

Set if the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.

Parameters:

allowTaskPreemption - the allowTaskPreemption value to set

Returns:

the JobPatchParameter object itself.

withConstraints

public JobPatchParameter withConstraints(JobConstraints constraints)

Set if omitted, the existing execution constraints are left unchanged.

Parameters:

constraints - the constraints value to set

Returns:

the JobPatchParameter object itself.

withMaxParallelTasks

public JobPatchParameter withMaxParallelTasks(Integer maxParallelTasks)

Set the value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API.

Parameters:

maxParallelTasks - the maxParallelTasks value to set

Returns:

the JobPatchParameter object itself.

withMetadata

public JobPatchParameter withMetadata(List metadata)

Set if omitted, the existing Job metadata is left unchanged.

Parameters:

metadata - the metadata value to set

Returns:

the JobPatchParameter object itself.

withNetworkConfiguration

public JobPatchParameter withNetworkConfiguration(JobNetworkConfiguration networkConfiguration)

Set the networkConfiguration value.

Parameters:

networkConfiguration - the networkConfiguration value to set

Returns:

the JobPatchParameter object itself.

withOnAllTasksComplete

public JobPatchParameter withOnAllTasksComplete(OnAllTasksComplete onAllTasksComplete)

Set if omitted, the completion behavior is left unchanged. You may not change the value from terminatejob to noaction - that is, once you have engaged automatic Job termination, you cannot turn it off again. If you try to do this, the request fails with an 'invalid property value' error response; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). Possible values include: 'noAction', 'terminateJob'.

Parameters:

onAllTasksComplete - the onAllTasksComplete value to set

Returns:

the JobPatchParameter object itself.

withPoolInfo

public JobPatchParameter withPoolInfo(PoolInformation poolInfo)

Set you may change the Pool for a Job only when the Job is disabled. The Patch Job call will fail if you include the poolInfo element and the Job is not disabled. If you specify an autoPoolSpecification in the poolInfo, only the keepAlive property of the autoPoolSpecification can be updated, and then only if the autoPoolSpecification has a poolLifetimeOption of Job (other job properties can be updated as normal). If omitted, the Job continues to run on its current Pool.

Parameters:

poolInfo - the poolInfo value to set

Returns:

the JobPatchParameter object itself.

withPriority

public JobPatchParameter withPriority(Integer priority)

Set priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If omitted, the priority of the Job is left unchanged.

Parameters:

priority - the priority value to set

Returns:

the JobPatchParameter object itself.

Applies to