TaskConstraints Class
- java.
lang. Object - com.
microsoft. azure. batch. protocol. models. TaskConstraints
- com.
public class TaskConstraints
Execution constraints to apply to a task.
Method Summary
Modifier and Type | Method and Description |
---|---|
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. |
Period |
maxWallClockTime()
Get if this is not specified, there is no time limit on how long the task may run. |
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. |
Task |
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. |
Task |
withMaxWallClockTime(Period maxWallClockTime)
Set if this is not specified, there is no time limit on how long the task may run. |
Task |
withRetentionTime(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. |
Method Details
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.
Returns:
maxWallClockTime
public Period maxWallClockTime()
Get if this is not specified, there is no time limit on how long the task may run.
Returns:
retentionTime
public 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:
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.
Parameters:
Returns:
withMaxWallClockTime
public TaskConstraints withMaxWallClockTime(Period maxWallClockTime)
Set if this is not specified, there is no time limit on how long the task may run.
Parameters:
Returns:
withRetentionTime
public TaskConstraints withRetentionTime(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:
Returns: