Class BatchSubtask

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

public final class BatchSubtask extends Object implements com.azure.json.JsonSerializable<BatchSubtask>
Information about an Azure Batch subtask.
  • Method Details

    • getId

      public Integer getId()
      Get the id property: The ID of the subtask.
      Returns:
      the id value.
    • getNodeInfo

      public BatchNodeInfo getNodeInfo()
      Get the nodeInfo property: Information about the Compute Node on which the subtask ran.
      Returns:
      the nodeInfo value.
    • getStartTime

      public OffsetDateTime getStartTime()
      Get the startTime property: The time at which the subtask started running. If the subtask has been restarted or retried, this is the most recent time at which the subtask started running.
      Returns:
      the startTime value.
    • getEndTime

      public OffsetDateTime getEndTime()
      Get the endTime property: The time at which the subtask completed. This property is set only if the subtask is in the Completed state.
      Returns:
      the endTime value.
    • getExitCode

      public Integer getExitCode()
      Get the exitCode property: The exit code of the program specified on the subtask command line. This property is set only if the subtask is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the subtask (due to timeout, or user termination via the API) you may see an operating system-defined exit code.
      Returns:
      the exitCode value.
    • getContainerInfo

      public BatchTaskContainerExecutionInfo getContainerInfo()
      Get the containerInfo property: Information about the container under which the Task is executing. This property is set only if the Task runs in a container context.
      Returns:
      the containerInfo value.
    • getFailureInfo

      public BatchTaskFailureInfo getFailureInfo()
      Get the failureInfo property: Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure.
      Returns:
      the failureInfo value.
    • getState

      public BatchSubtaskState getState()
      Get the state property: The current state of the subtask.
      Returns:
      the state value.
    • getStateTransitionTime

      public OffsetDateTime getStateTransitionTime()
      Get the stateTransitionTime property: The time at which the subtask entered its current state.
      Returns:
      the stateTransitionTime value.
    • getPreviousState

      public BatchSubtaskState getPreviousState()
      Get the previousState property: The previous state of the subtask. This property is not set if the subtask is in its initial running state.
      Returns:
      the previousState value.
    • getPreviousStateTransitionTime

      public OffsetDateTime getPreviousStateTransitionTime()
      Get the previousStateTransitionTime property: The time at which the subtask entered its previous state. This property is not set if the subtask is in its initial running state.
      Returns:
      the previousStateTransitionTime value.
    • getResult

      public BatchTaskExecutionResult getResult()
      Get the result property: The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property.
      Returns:
      the result value.
    • toJson

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

      public static BatchSubtask fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of BatchSubtask from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of BatchSubtask 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 BatchSubtask.