Class TaskConstraints
- java.lang.Object
-
- com.microsoft.azure.batch.protocol.models.TaskConstraints
-
public class TaskConstraints extends Object
Execution constraints to apply to a Task.
-
-
Constructor Summary
Constructors Constructor Description TaskConstraints()
-
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 for the Task executable due to a nonzero exit code.org.joda.time.Period
maxWallClockTime()
Get if this is not specified, there is no time limit on how long the Task may run.org.joda.time.Period
retentionTime()
Get the default is 7 days, i.e.TaskConstraints
withMaxTaskRetryCount(Integer maxTaskRetryCount)
Set note that this value specifically controls the number of retries for the Task executable due to a nonzero exit code.TaskConstraints
withMaxWallClockTime(org.joda.time.Period maxWallClockTime)
Set if this is not specified, there is no time limit on how long the Task may run.TaskConstraints
withRetentionTime(org.joda.time.Period retentionTime)
Set the default is 7 days, i.e.
-
-
-
Method Detail
-
maxWallClockTime
public org.joda.time.Period maxWallClockTime()
Get if this is not specified, there is no time limit on how long the Task may run.- Returns:
- the maxWallClockTime value
-
withMaxWallClockTime
public TaskConstraints withMaxWallClockTime(org.joda.time.Period maxWallClockTime)
Set if this is not specified, there is no time limit on how long the Task may run.- Parameters:
maxWallClockTime
- the maxWallClockTime value to set- Returns:
- the TaskConstraints object itself.
-
retentionTime
public org.joda.time.Period retentionTime()
Get the default is 7 days, i.e. the Task directory will be retained for 7 days unless the Compute Node is removed or the Job is deleted.- Returns:
- the retentionTime value
-
withRetentionTime
public TaskConstraints withRetentionTime(org.joda.time.Period retentionTime)
Set the default is 7 days, i.e. the Task directory will be retained for 7 days unless the Compute Node is removed or the Job is deleted.- Parameters:
retentionTime
- the retentionTime value to set- Returns:
- the TaskConstraints object itself.
-
maxTaskRetryCount
public Integer maxTaskRetryCount()
Get note that this value specifically controls the number of retries for the Task executable due to a nonzero exit code. The Batch service will try the Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the Task after the first attempt. If the maximum retry count is -1, the Batch service retries the Task without limit, however this is not recommended for a start task or any task. The default value is 0 (no retries).- Returns:
- the maxTaskRetryCount value
-
withMaxTaskRetryCount
public TaskConstraints withMaxTaskRetryCount(Integer maxTaskRetryCount)
Set note that this value specifically controls the number of retries for the Task executable due to a nonzero exit code. The Batch service will try the Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the Task after the first attempt. If the maximum retry count is -1, the Batch service retries the Task without limit, however this is not recommended for a start task or any task. The default value is 0 (no retries).- Parameters:
maxTaskRetryCount
- the maxTaskRetryCount value to set- Returns:
- the TaskConstraints object itself.
-
-