Class StartTaskInformation
- java.lang.Object
-
- com.microsoft.azure.batch.protocol.models.StartTaskInformation
-
public class StartTaskInformation extends Object
Information about a StartTask running on a Compute Node.
-
-
Constructor Summary
Constructors Constructor Description StartTaskInformation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaskContainerExecutionInformation
containerInfo()
Get this property is set only if the Task runs in a container context.org.joda.time.DateTime
endTime()
Get this is the end time of the most recent run of the StartTask, if that run has completed (even if that run failed and a retry is pending).Integer
exitCode()
Get this property is set only if the StartTask is in the completed state.TaskFailureInformation
failureInfo()
Get this property is set only if the Task is in the completed state and encountered a failure.org.joda.time.DateTime
lastRetryTime()
Get this element is present only if the Task was retried (i.e.TaskExecutionResult
result()
Get if the value is 'failed', then the details of the failure can be found in the failureInfo property.int
retryCount()
Get task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried.org.joda.time.DateTime
startTime()
Get this value is reset every time the Task is restarted or retried (that is, this is the most recent time at which the StartTask started running).StartTaskState
state()
Get possible values include: 'running', 'completed'.StartTaskInformation
withContainerInfo(TaskContainerExecutionInformation containerInfo)
Set this property is set only if the Task runs in a container context.StartTaskInformation
withEndTime(org.joda.time.DateTime endTime)
Set this is the end time of the most recent run of the StartTask, if that run has completed (even if that run failed and a retry is pending).StartTaskInformation
withExitCode(Integer exitCode)
Set this property is set only if the StartTask is in the completed state.StartTaskInformation
withFailureInfo(TaskFailureInformation failureInfo)
Set this property is set only if the Task is in the completed state and encountered a failure.StartTaskInformation
withLastRetryTime(org.joda.time.DateTime lastRetryTime)
Set this element is present only if the Task was retried (i.e.StartTaskInformation
withResult(TaskExecutionResult result)
Set if the value is 'failed', then the details of the failure can be found in the failureInfo property.StartTaskInformation
withRetryCount(int retryCount)
Set task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried.StartTaskInformation
withStartTime(org.joda.time.DateTime startTime)
Set this value is reset every time the Task is restarted or retried (that is, this is the most recent time at which the StartTask started running).StartTaskInformation
withState(StartTaskState state)
Set possible values include: 'running', 'completed'.
-
-
-
Method Detail
-
state
public StartTaskState state()
Get possible values include: 'running', 'completed'.- Returns:
- the state value
-
withState
public StartTaskInformation withState(StartTaskState state)
Set possible values include: 'running', 'completed'.- Parameters:
state
- the state value to set- Returns:
- the StartTaskInformation object itself.
-
startTime
public org.joda.time.DateTime startTime()
Get this value is reset every time the Task is restarted or retried (that is, this is the most recent time at which the StartTask started running).- Returns:
- the startTime value
-
withStartTime
public StartTaskInformation withStartTime(org.joda.time.DateTime startTime)
Set this value is reset every time the Task is restarted or retried (that is, this is the most recent time at which the StartTask started running).- Parameters:
startTime
- the startTime value to set- Returns:
- the StartTaskInformation object itself.
-
endTime
public org.joda.time.DateTime endTime()
Get this is the end time of the most recent run of the StartTask, if that run has completed (even if that run failed and a retry is pending). This element is not present if the StartTask is currently running.- Returns:
- the endTime value
-
withEndTime
public StartTaskInformation withEndTime(org.joda.time.DateTime endTime)
Set this is the end time of the most recent run of the StartTask, if that run has completed (even if that run failed and a retry is pending). This element is not present if the StartTask is currently running.- Parameters:
endTime
- the endTime value to set- Returns:
- the StartTaskInformation object itself.
-
exitCode
public Integer exitCode()
Get this property is set only if the StartTask 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 StartTask (due to timeout, or user termination via the API) you may see an operating system-defined exit code.- Returns:
- the exitCode value
-
withExitCode
public StartTaskInformation withExitCode(Integer exitCode)
Set this property is set only if the StartTask 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 StartTask (due to timeout, or user termination via the API) you may see an operating system-defined exit code.- Parameters:
exitCode
- the exitCode value to set- Returns:
- the StartTaskInformation object itself.
-
containerInfo
public TaskContainerExecutionInformation containerInfo()
Get this property is set only if the Task runs in a container context.- Returns:
- the containerInfo value
-
withContainerInfo
public StartTaskInformation withContainerInfo(TaskContainerExecutionInformation containerInfo)
Set this property is set only if the Task runs in a container context.- Parameters:
containerInfo
- the containerInfo value to set- Returns:
- the StartTaskInformation object itself.
-
failureInfo
public TaskFailureInformation failureInfo()
Get this property is set only if the Task is in the completed state and encountered a failure.- Returns:
- the failureInfo value
-
withFailureInfo
public StartTaskInformation withFailureInfo(TaskFailureInformation failureInfo)
Set this property is set only if the Task is in the completed state and encountered a failure.- Parameters:
failureInfo
- the failureInfo value to set- Returns:
- the StartTaskInformation object itself.
-
retryCount
public int retryCount()
Get task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints.- Returns:
- the retryCount value
-
withRetryCount
public StartTaskInformation withRetryCount(int retryCount)
Set task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints.- Parameters:
retryCount
- the retryCount value to set- Returns:
- the StartTaskInformation object itself.
-
lastRetryTime
public org.joda.time.DateTime lastRetryTime()
Get this element is present only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not.- Returns:
- the lastRetryTime value
-
withLastRetryTime
public StartTaskInformation withLastRetryTime(org.joda.time.DateTime lastRetryTime)
Set this element is present only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not.- Parameters:
lastRetryTime
- the lastRetryTime value to set- Returns:
- the StartTaskInformation object itself.
-
result
public TaskExecutionResult result()
Get if the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'success', 'failure'.- Returns:
- the result value
-
withResult
public StartTaskInformation withResult(TaskExecutionResult result)
Set if the value is 'failed', then the details of the failure can be found in the failureInfo property. Possible values include: 'success', 'failure'.- Parameters:
result
- the result value to set- Returns:
- the StartTaskInformation object itself.
-
-