JobSpecification Class
- java.
lang. Object - com.
microsoft. azure. batch. protocol. models. JobSpecification
- com.
public class JobSpecification
Specifies details of the jobs to be created on a schedule.
Method Summary
Modifier and Type | Method and Description |
---|---|
List<Environment |
commonEnvironmentSettings()
Get individual tasks can override an environment setting specified here by specifying the same setting name with a different value. |
Job |
constraints()
Get the constraints value. |
String |
displayName()
Get the name need not be unique and can contain any Unicode characters up to a maximum length of 1024. |
Job |
jobManagerTask()
Get if the job does not specify a Job Manager task, the user must explicitly add tasks to the job using the Task API. If the job does specify a Job Manager task, the Batch service creates the Job Manager task when the job is created, and will try to schedule the Job Manager task before scheduling other tasks in the job. |
Job |
jobPreparationTask()
Get if a job has a Job Preparation task, the Batch service will run the Job Preparation task on a compute node before starting any tasks of that job on that compute node. |
Job |
jobReleaseTask()
Get the primary purpose of the Job Release task is to undo changes to compute nodes made by the Job Preparation task. Example activities include deleting local files, or shutting down services that were started as part of job preparation. A Job Release task cannot be specified without also specifying a Job Preparation task for the job. The Batch service runs the Job Release task on the compute nodes that have run the Job Preparation task. |
List<Metadata |
metadata()
Get the Batch service does not assign any meaning to metadata; it is solely for the use of user code. |
Job |
networkConfiguration()
Get the networkConfiguration value. |
On |
onAllTasksComplete()
Get note that if a job contains no tasks, then all tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the job properties to set onAllTasksComplete to terminatejob once you have finished adding tasks. The default is noaction. Possible values include: 'noAction', 'terminateJob'. |
On |
onTaskFailure()
Get the default is noaction. Possible values include: 'noAction', 'performExitOptionsJobAction'. |
Pool |
poolInfo()
Get the poolInfo value. |
Integer |
priority()
Get 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. This priority is used as the default for all jobs under the job schedule. You can update a job's priority after it has been created using by using the update job API. |
Boolean |
usesTaskDependencies()
Get the usesTaskDependencies value. |
Job |
withCommonEnvironmentSettings(List<EnvironmentSetting> commonEnvironmentSettings)
Set individual tasks can override an environment setting specified here by specifying the same setting name with a different value. |
Job |
withConstraints(JobConstraints constraints)
Set the constraints value. |
Job |
withDisplayName(String displayName)
Set the name need not be unique and can contain any Unicode characters up to a maximum length of 1024. |
Job |
withJobManagerTask(JobManagerTask jobManagerTask)
Set if the job does not specify a Job Manager task, the user must explicitly add tasks to the job using the Task API. If the job does specify a Job Manager task, the Batch service creates the Job Manager task when the job is created, and will try to schedule the Job Manager task before scheduling other tasks in the job. |
Job |
withJobPreparationTask(JobPreparationTask jobPreparationTask)
Set if a job has a Job Preparation task, the Batch service will run the Job Preparation task on a compute node before starting any tasks of that job on that compute node. |
Job |
withJobReleaseTask(JobReleaseTask jobReleaseTask)
Set the primary purpose of the Job Release task is to undo changes to compute nodes made by the Job Preparation task. Example activities include deleting local files, or shutting down services that were started as part of job preparation. A Job Release task cannot be specified without also specifying a Job Preparation task for the job. The Batch service runs the Job Release task on the compute nodes that have run the Job Preparation task. |
Job |
withMetadata(List<MetadataItem> metadata)
Set the Batch service does not assign any meaning to metadata; it is solely for the use of user code. |
Job |
withNetworkConfiguration(JobNetworkConfiguration networkConfiguration)
Set the networkConfiguration value. |
Job |
withOnAllTasksComplete(OnAllTasksComplete onAllTasksComplete)
Set note that if a job contains no tasks, then all tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the job properties to set onAllTasksComplete to terminatejob once you have finished adding tasks. The default is noaction. Possible values include: 'noAction', 'terminateJob'. |
Job |
withOnTaskFailure(OnTaskFailure onTaskFailure)
Set the default is noaction. Possible values include: 'noAction', 'performExitOptionsJobAction'. |
Job |
withPoolInfo(PoolInformation poolInfo)
Set the poolInfo value. |
Job |
withPriority(Integer priority)
Set 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. This priority is used as the default for all jobs under the job schedule. You can update a job's priority after it has been created using by using the update job API. |
Job |
withUsesTaskDependencies(Boolean usesTaskDependencies)
Set the usesTaskDependencies value. |
Method Details
commonEnvironmentSettings
public List
Get individual tasks can override an environment setting specified here by specifying the same setting name with a different value.
Returns:
constraints
public JobConstraints constraints()
Get the constraints value.
Returns:
displayName
public String displayName()
Get the name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
Returns:
jobManagerTask
public JobManagerTask jobManagerTask()
Get if the job does not specify a Job Manager task, the user must explicitly add tasks to the job using the Task API. If the job does specify a Job Manager task, the Batch service creates the Job Manager task when the job is created, and will try to schedule the Job Manager task before scheduling other tasks in the job.
Returns:
jobPreparationTask
public JobPreparationTask jobPreparationTask()
Get if a job has a Job Preparation task, the Batch service will run the Job Preparation task on a compute node before starting any tasks of that job on that compute node.
Returns:
jobReleaseTask
public JobReleaseTask jobReleaseTask()
Get the primary purpose of the Job Release task is to undo changes to compute nodes made by the Job Preparation task. Example activities include deleting local files, or shutting down services that were started as part of job preparation. A Job Release task cannot be specified without also specifying a Job Preparation task for the job. The Batch service runs the Job Release task on the compute nodes that have run the Job Preparation task.
Returns:
metadata
public List
Get the Batch service does not assign any meaning to metadata; it is solely for the use of user code.
Returns:
networkConfiguration
public JobNetworkConfiguration networkConfiguration()
Get the networkConfiguration value.
Returns:
onAllTasksComplete
public OnAllTasksComplete onAllTasksComplete()
Get note that if a job contains no tasks, then all tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the job properties to set onAllTasksComplete to terminatejob once you have finished adding tasks. The default is noaction. Possible values include: 'noAction', 'terminateJob'.
Returns:
onTaskFailure
public OnTaskFailure onTaskFailure()
Get the default is noaction. Possible values include: 'noAction', 'performExitOptionsJobAction'.
Returns:
poolInfo
public PoolInformation poolInfo()
Get the poolInfo value.
Returns:
priority
public Integer priority()
Get 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. This priority is used as the default for all jobs under the job schedule. You can update a job's priority after it has been created using by using the update job API.
Returns:
usesTaskDependencies
public Boolean usesTaskDependencies()
Get the usesTaskDependencies value.
Returns:
withCommonEnvironmentSettings
public JobSpecification withCommonEnvironmentSettings(List
Set individual tasks can override an environment setting specified here by specifying the same setting name with a different value.
Parameters:
Returns:
withConstraints
public JobSpecification withConstraints(JobConstraints constraints)
Set the constraints value.
Parameters:
Returns:
withDisplayName
public JobSpecification withDisplayName(String displayName)
Set the name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
Parameters:
Returns:
withJobManagerTask
public JobSpecification withJobManagerTask(JobManagerTask jobManagerTask)
Set if the job does not specify a Job Manager task, the user must explicitly add tasks to the job using the Task API. If the job does specify a Job Manager task, the Batch service creates the Job Manager task when the job is created, and will try to schedule the Job Manager task before scheduling other tasks in the job.
Parameters:
Returns:
withJobPreparationTask
public JobSpecification withJobPreparationTask(JobPreparationTask jobPreparationTask)
Set if a job has a Job Preparation task, the Batch service will run the Job Preparation task on a compute node before starting any tasks of that job on that compute node.
Parameters:
Returns:
withJobReleaseTask
public JobSpecification withJobReleaseTask(JobReleaseTask jobReleaseTask)
Set the primary purpose of the Job Release task is to undo changes to compute nodes made by the Job Preparation task. Example activities include deleting local files, or shutting down services that were started as part of job preparation. A Job Release task cannot be specified without also specifying a Job Preparation task for the job. The Batch service runs the Job Release task on the compute nodes that have run the Job Preparation task.
Parameters:
Returns:
withMetadata
public JobSpecification withMetadata(List
Set the Batch service does not assign any meaning to metadata; it is solely for the use of user code.
Parameters:
Returns:
withNetworkConfiguration
public JobSpecification withNetworkConfiguration(JobNetworkConfiguration networkConfiguration)
Set the networkConfiguration value.
Parameters:
Returns:
withOnAllTasksComplete
public JobSpecification withOnAllTasksComplete(OnAllTasksComplete onAllTasksComplete)
Set note that if a job contains no tasks, then all tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the job properties to set onAllTasksComplete to terminatejob once you have finished adding tasks. The default is noaction. Possible values include: 'noAction', 'terminateJob'.
Parameters:
Returns:
withOnTaskFailure
public JobSpecification withOnTaskFailure(OnTaskFailure onTaskFailure)
Set the default is noaction. Possible values include: 'noAction', 'performExitOptionsJobAction'.
Parameters:
Returns:
withPoolInfo
public JobSpecification withPoolInfo(PoolInformation poolInfo)
Set the poolInfo value.
Parameters:
Returns:
withPriority
public JobSpecification withPriority(Integer priority)
Set 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. This priority is used as the default for all jobs under the job schedule. You can update a job's priority after it has been created using by using the update job API.
Parameters:
Returns:
withUsesTaskDependencies
public JobSpecification withUsesTaskDependencies(Boolean usesTaskDependencies)
Set the usesTaskDependencies value.
Parameters:
Returns:
Applies to
Azure SDK for Java