Share via


ExitConditions Class

  • java.lang.Object
    • com.azure.compute.batch.models.ExitConditions

Implements

public final class ExitConditions
implements JsonSerializable<ExitConditions>

Specifies how the Batch service should respond when the Task completes.

Constructor Summary

Constructor Description
ExitConditions()

Creates an instance of ExitConditions class.

Method Summary

Modifier and Type Method and Description
static ExitConditions fromJson(JsonReader jsonReader)

Reads an instance of ExitConditions from the JsonReader.

ExitOptions getDefaultProperty()

Get the defaultProperty property: How the Batch service should respond if the Task fails with an exit condition not covered by any of the other properties.

List<ExitCodeRangeMapping> getExitCodeRanges()

Get the exitCodeRanges property: A list of Task exit code ranges and how the Batch service should respond to them.

List<ExitCodeMapping> getExitCodes()

Get the exitCodes property: A list of individual Task exit codes and how the Batch service should respond to them.

ExitOptions getFileUploadError()

Get the fileUploadError property: How the Batch service should respond if a file upload error occurs.

ExitOptions getPreProcessingError()

Get the preProcessingError property: How the Batch service should respond if the Task fails to start due to an error.

ExitConditions setDefaultProperty(ExitOptions defaultProperty)

Set the defaultProperty property: How the Batch service should respond if the Task fails with an exit condition not covered by any of the other properties.

ExitConditions setExitCodeRanges(List<ExitCodeRangeMapping> exitCodeRanges)

Set the exitCodeRanges property: A list of Task exit code ranges and how the Batch service should respond to them.

ExitConditions setExitCodes(List<ExitCodeMapping> exitCodes)

Set the exitCodes property: A list of individual Task exit codes and how the Batch service should respond to them.

ExitConditions setFileUploadError(ExitOptions fileUploadError)

Set the fileUploadError property: How the Batch service should respond if a file upload error occurs.

ExitConditions setPreProcessingError(ExitOptions preProcessingError)

Set the preProcessingError property: How the Batch service should respond if the Task fails to start due to an error.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

ExitConditions

public ExitConditions()

Creates an instance of ExitConditions class.

Method Details

fromJson

public static ExitConditions fromJson(JsonReader jsonReader)

Reads an instance of ExitConditions from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ExitConditions if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the ExitConditions.

getDefaultProperty

public ExitOptions getDefaultProperty()

Get the defaultProperty property: How the Batch service should respond if the Task fails with an exit condition not covered by any of the other properties. This value is used if the Task exits with any nonzero exit code not listed in the exitCodes or exitCodeRanges collection, with a pre-processing error if the preProcessingError property is not present, or with a file upload error if the fileUploadError property is not present. If you want non-default behavior on exit code 0, you must list it explicitly using the exitCodes or exitCodeRanges collection.

Returns:

the defaultProperty value.

getExitCodeRanges

public List<ExitCodeRangeMapping> getExitCodeRanges()

Get the exitCodeRanges property: A list of Task exit code ranges and how the Batch service should respond to them.

Returns:

the exitCodeRanges value.

getExitCodes

public List<ExitCodeMapping> getExitCodes()

Get the exitCodes property: A list of individual Task exit codes and how the Batch service should respond to them.

Returns:

the exitCodes value.

getFileUploadError

public ExitOptions getFileUploadError()

Get the fileUploadError property: How the Batch service should respond if a file upload error occurs. If the Task exited with an exit code that was specified via exitCodes or exitCodeRanges, and then encountered a file upload error, then the action specified by the exit code takes precedence.

Returns:

the fileUploadError value.

getPreProcessingError

public ExitOptions getPreProcessingError()

Get the preProcessingError property: How the Batch service should respond if the Task fails to start due to an error.

Returns:

the preProcessingError value.

setDefaultProperty

public ExitConditions setDefaultProperty(ExitOptions defaultProperty)

Set the defaultProperty property: How the Batch service should respond if the Task fails with an exit condition not covered by any of the other properties. This value is used if the Task exits with any nonzero exit code not listed in the exitCodes or exitCodeRanges collection, with a pre-processing error if the preProcessingError property is not present, or with a file upload error if the fileUploadError property is not present. If you want non-default behavior on exit code 0, you must list it explicitly using the exitCodes or exitCodeRanges collection.

Parameters:

defaultProperty - the defaultProperty value to set.

Returns:

the ExitConditions object itself.

setExitCodeRanges

public ExitConditions setExitCodeRanges(List<ExitCodeRangeMapping> exitCodeRanges)

Set the exitCodeRanges property: A list of Task exit code ranges and how the Batch service should respond to them.

Parameters:

exitCodeRanges - the exitCodeRanges value to set.

Returns:

the ExitConditions object itself.

setExitCodes

public ExitConditions setExitCodes(List<ExitCodeMapping> exitCodes)

Set the exitCodes property: A list of individual Task exit codes and how the Batch service should respond to them.

Parameters:

exitCodes - the exitCodes value to set.

Returns:

the ExitConditions object itself.

setFileUploadError

public ExitConditions setFileUploadError(ExitOptions fileUploadError)

Set the fileUploadError property: How the Batch service should respond if a file upload error occurs. If the Task exited with an exit code that was specified via exitCodes or exitCodeRanges, and then encountered a file upload error, then the action specified by the exit code takes precedence.

Parameters:

fileUploadError - the fileUploadError value to set.

Returns:

the ExitConditions object itself.

setPreProcessingError

public ExitConditions setPreProcessingError(ExitOptions preProcessingError)

Set the preProcessingError property: How the Batch service should respond if the Task fails to start due to an error.

Parameters:

preProcessingError - the preProcessingError value to set.

Returns:

the ExitConditions object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to