StartTaskInformation Class
- java.
lang. Object - com.
microsoft. azure. batch. protocol. models. StartTaskInformation
- com.
public class StartTaskInformation
Information about a start task running on a compute node.
Method Summary
Modifier and Type | Method and Description |
---|---|
Task |
containerInfo()
Get this property is set only if the task runs in a container context. |
DateTime |
endTime()
Get this is the end time of the most recent run of the start task, if that run has completed (even if that run failed and a retry is pending). This element is not present if the start task is currently running. |
Integer |
exitCode()
Get this property is set only if the start task 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 start task (due to timeout, or user termination via the API) you may see an operating system-defined exit code. |
Task |
failureInfo()
Get this property is set only if the task is in the completed state and encountered a failure. |
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. |
Task |
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'. |
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. |
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 start task started running). |
Start |
state()
Get possible values include: 'running', 'completed'. |
Start |
withContainerInfo(TaskContainerExecutionInformation containerInfo)
Set this property is set only if the task runs in a container context. |
Start |
withEndTime(DateTime endTime)
Set this is the end time of the most recent run of the start task, if that run has completed (even if that run failed and a retry is pending). This element is not present if the start task is currently running. |
Start |
withExitCode(Integer exitCode)
Set this property is set only if the start task 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 start task (due to timeout, or user termination via the API) you may see an operating system-defined exit code. |
Start |
withFailureInfo(TaskFailureInformation failureInfo)
Set this property is set only if the task is in the completed state and encountered a failure. |
Start |
withLastRetryTime(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. |
Start |
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'. |
Start |
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. |
Start |
withStartTime(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 start task started running). |
Start |
withState(StartTaskState state)
Set possible values include: 'running', 'completed'. |
Method Details
containerInfo
public TaskContainerExecutionInformation containerInfo()
Get this property is set only if the task runs in a container context.
Returns:
endTime
public DateTime endTime()
Get this is the end time of the most recent run of the start task, if that run has completed (even if that run failed and a retry is pending). This element is not present if the start task is currently running.
Returns:
exitCode
public Integer exitCode()
Get this property is set only if the start task 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 start task (due to timeout, or user termination via the API) you may see an operating system-defined exit code.
Returns:
failureInfo
public TaskFailureInformation failureInfo()
Get this property is set only if the task is in the completed state and encountered a failure.
Returns:
lastRetryTime
public 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:
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:
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:
startTime
public 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 start task started running).
Returns:
state
public StartTaskState state()
Get possible values include: 'running', 'completed'.
Returns:
withContainerInfo
public StartTaskInformation withContainerInfo(TaskContainerExecutionInformation containerInfo)
Set this property is set only if the task runs in a container context.
Parameters:
Returns:
withEndTime
public StartTaskInformation withEndTime(DateTime endTime)
Set this is the end time of the most recent run of the start task, if that run has completed (even if that run failed and a retry is pending). This element is not present if the start task is currently running.
Parameters:
Returns:
withExitCode
public StartTaskInformation withExitCode(Integer exitCode)
Set this property is set only if the start task 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 start task (due to timeout, or user termination via the API) you may see an operating system-defined exit code.
Parameters:
Returns:
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:
Returns:
withLastRetryTime
public StartTaskInformation withLastRetryTime(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:
Returns:
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:
Returns:
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:
Returns:
withStartTime
public StartTaskInformation withStartTime(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 start task started running).
Parameters:
Returns:
withState
public StartTaskInformation withState(StartTaskState state)
Set possible values include: 'running', 'completed'.
Parameters:
Returns:
Applies to
Azure SDK for Java