JobConstraints Class

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

public class JobConstraints

The execution constraints for a Job.

Constructor Summary

Constructor Description
JobConstraints()

Method Summary

Modifier and Type Method and Description
Integer maxTaskRetryCount()

Get note that this value specifically controls the number of retries.

org.joda.time.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.

JobConstraints withMaxTaskRetryCount(Integer maxTaskRetryCount)

Set note that this value specifically controls the number of 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.

Methods inherited from java.lang.Object

Constructor Details

JobConstraints

public JobConstraints()

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