Class JobConstraints
- java.lang.Object
-
- com.microsoft.azure.batch.protocol.models.JobConstraints
-
public class JobConstraints extends Object
The execution constraints for a Job.
-
-
Constructor Summary
Constructors Constructor Description JobConstraints()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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(org.joda.time.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.
-
-
-
Method Detail
-
maxWallClockTime
public 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. 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
-
withMaxWallClockTime
public JobConstraints withMaxWallClockTime(org.joda.time.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.
-
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
-
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.
-
-