Share via


ExitOptions Class

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

Implements

public final class ExitOptions
implements JsonSerializable<ExitOptions>

Specifies how the Batch service responds to a particular exit condition.

Constructor Summary

Constructor Description
ExitOptions()

Creates an instance of ExitOptions class.

Method Summary

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

Reads an instance of ExitOptions from the JsonReader.

DependencyAction getDependencyAction()

Get the dependencyAction property: An action that the Batch service performs on Tasks that depend on this Task.

BatchJobActionKind getJobAction()

Get the jobAction property: An action to take on the Job containing the Task, if the Task completes with the given exit condition and the Job's onTaskFailed property is 'performExitOptionsJobAction'.

ExitOptions setDependencyAction(DependencyAction dependencyAction)

Set the dependencyAction property: An action that the Batch service performs on Tasks that depend on this Task.

ExitOptions setJobAction(BatchJobActionKind jobAction)

Set the jobAction property: An action to take on the Job containing the Task, if the Task completes with the given exit condition and the Job's onTaskFailed property is 'performExitOptionsJobAction'.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

ExitOptions

public ExitOptions()

Creates an instance of ExitOptions class.

Method Details

fromJson

public static ExitOptions fromJson(JsonReader jsonReader)

Reads an instance of ExitOptions from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ExitOptions 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 ExitOptions.

getDependencyAction

public DependencyAction getDependencyAction()

Get the dependencyAction property: An action that the Batch service performs on Tasks that depend on this Task. Possible values are 'satisfy' (allowing dependent tasks to progress) and 'block' (dependent tasks continue to wait). Batch does not yet support cancellation of dependent tasks.

Returns:

the dependencyAction value.

getJobAction

public BatchJobActionKind getJobAction()

Get the jobAction property: An action to take on the Job containing the Task, if the Task completes with the given exit condition and the Job's onTaskFailed property is 'performExitOptionsJobAction'. The default is none for exit code 0 and terminate for all other exit conditions. If the Job's onTaskFailed property is noaction, then specifying this property returns an error and the add Task request fails with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

Returns:

the jobAction value.

setDependencyAction

public ExitOptions setDependencyAction(DependencyAction dependencyAction)

Set the dependencyAction property: An action that the Batch service performs on Tasks that depend on this Task. Possible values are 'satisfy' (allowing dependent tasks to progress) and 'block' (dependent tasks continue to wait). Batch does not yet support cancellation of dependent tasks.

Parameters:

dependencyAction - the dependencyAction value to set.

Returns:

the ExitOptions object itself.

setJobAction

public ExitOptions setJobAction(BatchJobActionKind jobAction)

Set the jobAction property: An action to take on the Job containing the Task, if the Task completes with the given exit condition and the Job's onTaskFailed property is 'performExitOptionsJobAction'. The default is none for exit code 0 and terminate for all other exit conditions. If the Job's onTaskFailed property is noaction, then specifying this property returns an error and the add Task request fails with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

Parameters:

jobAction - the jobAction value to set.

Returns:

the ExitOptions object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to