JobConstraints Class

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

public class JobConstraints

The execution constraints for a job.

Method Summary

Modifier and Type Method and Description
Integer maxTaskRetryCount()

Get note that this value specifically controls the number of retries. The Batch service will try each task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry tasks. If the maximum retry count is -1, the Batch service retries tasks without limit. The default value is 0 (no retries).

Period maxWallClockTime()

Get if the job does not complete within the time limit, the Batch service terminates it and any tasks that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long the job may run.

JobConstraints withMaxTaskRetryCount(Integer maxTaskRetryCount)

Set note that this value specifically controls the number of retries. The Batch service will try each task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry tasks. If the maximum retry count is -1, the Batch service retries tasks without limit. The default value is 0 (no retries).

JobConstraints withMaxWallClockTime(Period maxWallClockTime)

Set if the job does not complete within the time limit, the Batch service terminates it and any tasks that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long the job may run.

Method Details

maxTaskRetryCount

public Integer maxTaskRetryCount()

Get note that this value specifically controls the number of retries. The Batch service will try each task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry tasks. If the maximum retry count is -1, the Batch service retries tasks without limit. The default value is 0 (no retries).

Returns:

the maxTaskRetryCount value

maxWallClockTime

public Period maxWallClockTime()

Get if the job does not complete within the time limit, the Batch service terminates it and any tasks that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long the job may run.

Returns:

the maxWallClockTime value

withMaxTaskRetryCount

public JobConstraints withMaxTaskRetryCount(Integer maxTaskRetryCount)

Set note that this value specifically controls the number of retries. The Batch service will try each task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry tasks. If the maximum retry count is -1, the Batch service retries tasks without limit. The default value is 0 (no retries).

Parameters:

maxTaskRetryCount - the maxTaskRetryCount value to set

Returns:

the JobConstraints object itself.

withMaxWallClockTime

public JobConstraints withMaxWallClockTime(Period maxWallClockTime)

Set if the job does not complete within the time limit, the Batch service terminates it and any tasks that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long the job may run.

Parameters:

maxWallClockTime - the maxWallClockTime value to set

Returns:

the JobConstraints object itself.

Applies to