Class ExitOptions

java.lang.Object
com.azure.compute.batch.models.ExitOptions
All Implemented Interfaces:
com.azure.json.JsonSerializable<ExitOptions>

public final class ExitOptions extends Object implements com.azure.json.JsonSerializable<ExitOptions>
Specifies how the Batch service responds to a particular exit condition.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of ExitOptions class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ExitOptions from the JsonReader.
    Get the dependencyAction property: An action that the Batch service performs on Tasks that depend on this Task.
    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'.
    Set the dependencyAction property: An action that the Batch service performs on Tasks that depend on this Task.
    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'.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • ExitOptions

      public ExitOptions()
      Creates an instance of ExitOptions class.
  • Method Details

    • getJobAction

      public BatchJobAction 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.
    • setJobAction

      public ExitOptions setJobAction(BatchJobAction 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.
    • 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.
    • 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.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ExitOptions>
      Throws:
      IOException
    • fromJson

      public static ExitOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.