BatchJobConstraints Class
- java.
lang. Object - com.
azure. compute. batch. models. BatchJobConstraints
- com.
Implements
public final class BatchJobConstraints
implements JsonSerializable<BatchJobConstraints>
The execution constraints for a Job.
Constructor Summary
| Constructor | Description |
|---|---|
| BatchJobConstraints() |
Creates an instance of Batch |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Batch |
fromJson(JsonReader jsonReader)
Reads an instance of Batch |
| Integer |
getMaxTaskRetryCount()
Get the max |
| Duration |
getMaxWallClockTime()
Get the max |
|
Batch |
setMaxTaskRetryCount(Integer maxTaskRetryCount)
Set the max |
|
Batch |
setMaxWallClockTime(Duration maxWallClockTime)
Set the max |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
BatchJobConstraints
public BatchJobConstraints()
Creates an instance of BatchJobConstraints class.
Method Details
fromJson
public static BatchJobConstraints fromJson(JsonReader jsonReader)
Reads an instance of BatchJobConstraints from the JsonReader.
Parameters:
Returns:
Throws:
getMaxTaskRetryCount
public Integer getMaxTaskRetryCount()
Get the maxTaskRetryCount property: The maximum number of times each Task may be retried. The Batch service retries a Task if its exit code is nonzero. 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:
getMaxWallClockTime
public Duration getMaxWallClockTime()
Get the maxWallClockTime property: The maximum elapsed time that the Job may run, measured from the time the Job is created. 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:
setMaxTaskRetryCount
public BatchJobConstraints setMaxTaskRetryCount(Integer maxTaskRetryCount)
Set the maxTaskRetryCount property: The maximum number of times each Task may be retried. The Batch service retries a Task if its exit code is nonzero. 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:
Returns:
setMaxWallClockTime
public BatchJobConstraints setMaxWallClockTime(Duration maxWallClockTime)
Set the maxWallClockTime property: The maximum elapsed time that the Job may run, measured from the time the Job is created. 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:
Returns: