BatchJob Class
- java.
lang. Object - com.
azure. compute. batch. models. BatchJob
- com.
Implements
public final class BatchJob
implements JsonSerializable<BatchJob>
An Azure Batch Job.
Constructor Summary
| Constructor | Description |
|---|---|
| BatchJob(BatchPoolInfo poolInfo) |
Creates an instance of Batch |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Batch |
fromJson(JsonReader jsonReader)
Reads an instance of Batch |
|
Batch |
getAllTasksCompleteMode()
Get the all |
|
List<Environment |
getCommonEnvironmentSettings()
Get the common |
|
Batch |
getConstraints()
Get the constraints property: The execution constraints for the Job. |
|
Offset |
getCreationTime()
Get the creation |
| String |
getDisplayName()
Get the display |
| String |
getETag()
Get the e |
|
Batch |
getExecutionInfo()
Get the execution |
| String |
getId()
Get the id property: A string that uniquely identifies the Job within the Account. |
|
Batch |
getJobManagerTask()
Get the job |
|
Batch |
getJobPreparationTask()
Get the job |
|
Batch |
getJobReleaseTask()
Get the job |
|
Batch |
getJobStatistics()
Get the job |
|
Offset |
getLastModified()
Get the last |
| Integer |
getMaxParallelTasks()
Get the max |
|
List<Batch |
getMetadata()
Get the metadata property: A list of name-value pairs associated with the Job as metadata. |
|
Batch |
getNetworkConfiguration()
Get the network |
|
Batch |
getPoolInfo()
Get the pool |
|
Batch |
getPreviousState()
Get the previous |
|
Offset |
getPreviousStateTransitionTime()
Get the previous |
| Integer |
getPriority()
Get the priority property: The priority of the Job. |
|
Batch |
getState()
Get the state property: The current state of the Job. |
|
Offset |
getStateTransitionTime()
Get the state |
|
Batch |
getTaskFailureMode()
Get the task |
| String |
getUrl()
Get the url property: The URL of the Job. |
| Boolean |
isAllowTaskPreemption()
Get the allow |
| Boolean |
isUsesTaskDependencies()
Get the uses |
|
Batch |
setAllowTaskPreemption(Boolean allowTaskPreemption)
Set the allow |
|
Batch |
setAllTasksCompleteMode(BatchAllTasksCompleteMode allTasksCompleteMode)
Set the all |
|
Batch |
setConstraints(BatchJobConstraints constraints)
Set the constraints property: The execution constraints for the Job. |
|
Batch |
setMaxParallelTasks(Integer maxParallelTasks)
Set the max |
|
Batch |
setMetadata(List<BatchMetadataItem> metadata)
Set the metadata property: A list of name-value pairs associated with the Job as metadata. |
|
Batch |
setPriority(Integer priority)
Set the priority property: The priority of the Job. |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
BatchJob
public BatchJob(BatchPoolInfo poolInfo)
Creates an instance of BatchJob class.
Parameters:
Method Details
fromJson
public static BatchJob fromJson(JsonReader jsonReader)
Reads an instance of BatchJob from the JsonReader.
Parameters:
Returns:
Throws:
getAllTasksCompleteMode
public BatchAllTasksCompleteMode getAllTasksCompleteMode()
Get the allTasksCompleteMode property: The action the Batch service should take when all Tasks in the Job are in the completed state. The default is noaction.
Returns:
getCommonEnvironmentSettings
public List<EnvironmentSetting> getCommonEnvironmentSettings()
Get the commonEnvironmentSettings property: The list of common environment variable settings. These environment variables are set for all Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value.
Returns:
getConstraints
public BatchJobConstraints getConstraints()
Get the constraints property: The execution constraints for the Job.
Returns:
getCreationTime
public OffsetDateTime getCreationTime()
Get the creationTime property: The creation time of the Job.
Returns:
getDisplayName
public String getDisplayName()
Get the displayName property: The display name for the Job.
Returns:
getETag
public String getETag()
Get the eTag property: The ETag of the Job. This is an opaque string. You can use it to detect whether the Job has changed between requests. In particular, you can be pass the ETag when updating a Job to specify that your changes should take effect only if nobody else has modified the Job in the meantime.
Returns:
getExecutionInfo
public BatchJobExecutionInfo getExecutionInfo()
Get the executionInfo property: The execution information for the Job.
Returns:
getId
public String getId()
Get the id property: A string that uniquely identifies the Job within the Account. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case).
Returns:
getJobManagerTask
public BatchJobManagerTask getJobManagerTask()
Get the jobManagerTask property: Details of a Job Manager Task to be launched when the Job is started.
Returns:
getJobPreparationTask
public BatchJobPreparationTask getJobPreparationTask()
Get the jobPreparationTask property: The Job Preparation Task. The Job Preparation Task is a special Task run on each Compute Node before any other Task of the Job.
Returns:
getJobReleaseTask
public BatchJobReleaseTask getJobReleaseTask()
Get the jobReleaseTask property: The Job Release Task. The Job Release Task is a special Task run at the end of the Job on each Compute Node that has run any other Task of the Job.
Returns:
getJobStatistics
public BatchJobStatistics getJobStatistics()
Get the jobStatistics property: Resource usage statistics for the entire lifetime of the Job. This property is populated only if the BatchJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes.
Returns:
getLastModified
public OffsetDateTime getLastModified()
Get the lastModified property: The last modified time of the Job. This is the last time at which the Job level data, such as the Job state or priority, changed. It does not factor in task-level changes such as adding new Tasks or Tasks changing state.
Returns:
getMaxParallelTasks
public Integer getMaxParallelTasks()
Get the maxParallelTasks property: The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API.
Returns:
getMetadata
public List<BatchMetadataItem> getMetadata()
Get the metadata property: A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
Returns:
getNetworkConfiguration
public BatchJobNetworkConfiguration getNetworkConfiguration()
Get the networkConfiguration property: The network configuration for the Job.
Returns:
getPoolInfo
public BatchPoolInfo getPoolInfo()
Get the poolInfo property: The Pool settings associated with the Job.
Returns:
getPreviousState
public BatchJobState getPreviousState()
Get the previousState property: The previous state of the Job. This property is not set if the Job is in its initial Active state.
Returns:
getPreviousStateTransitionTime
public OffsetDateTime getPreviousStateTransitionTime()
Get the previousStateTransitionTime property: The time at which the Job entered its previous state. This property is not set if the Job is in its initial Active state.
Returns:
getPriority
public Integer getPriority()
Get the priority property: The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.
Returns:
getState
public BatchJobState getState()
Get the state property: The current state of the Job.
Returns:
getStateTransitionTime
public OffsetDateTime getStateTransitionTime()
Get the stateTransitionTime property: The time at which the Job entered its current state.
Returns:
getTaskFailureMode
public BatchTaskFailureMode getTaskFailureMode()
Get the taskFailureMode property: The action the Batch service should take when any Task in the Job fails. A Task is considered to have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction.
Returns:
getUrl
public String getUrl()
Get the url property: The URL of the Job.
Returns:
isAllowTaskPreemption
public Boolean isAllowTaskPreemption()
Get the allowTaskPreemption property: Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.
Returns:
isUsesTaskDependencies
public Boolean isUsesTaskDependencies()
Get the usesTaskDependencies property: Whether Tasks in the Job can define dependencies on each other. The default is false.
Returns:
setAllowTaskPreemption
public BatchJob setAllowTaskPreemption(Boolean allowTaskPreemption)
Set the allowTaskPreemption property: Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.
Parameters:
Returns:
setAllTasksCompleteMode
public BatchJob setAllTasksCompleteMode(BatchAllTasksCompleteMode allTasksCompleteMode)
Set the allTasksCompleteMode property: The action the Batch service should take when all Tasks in the Job are in the completed state. The default is noaction.
Parameters:
Returns:
setConstraints
public BatchJob setConstraints(BatchJobConstraints constraints)
Set the constraints property: The execution constraints for the Job.
Parameters:
Returns:
setMaxParallelTasks
public BatchJob setMaxParallelTasks(Integer maxParallelTasks)
Set the maxParallelTasks property: The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API.
Parameters:
Returns:
setMetadata
public BatchJob setMetadata(List<BatchMetadataItem> metadata)
Set the metadata property: A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
Parameters:
Returns:
setPriority
public BatchJob setPriority(Integer priority)
Set the priority property: The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.
Parameters:
Returns: