CloudJob Class

  • java.lang.Object
    • com.microsoft.azure.batch.protocol.models.CloudJob

public class CloudJob

An Azure Batch Job.

Constructor Summary

Constructor Description
CloudJob()

Method Summary

Modifier and Type Method and Description
Boolean allowTaskPreemption()

Get 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.

List<EnvironmentSetting> commonEnvironmentSettings()

Get individual Tasks can override an environment setting specified here by specifying the same setting name with a different value.

JobConstraints constraints()

Get the constraints value.

org.joda.time.DateTime creationTime()

Get the creationTime value.

String displayName()

Get the displayName value.

String eTag()

Get this is an opaque string.

JobExecutionInformation executionInfo()

Get the executionInfo value.

String id()

Get the ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case).

JobManagerTask jobManagerTask()

Get the jobManagerTask value.

JobPreparationTask jobPreparationTask()

Get the Job Preparation Task is a special Task run on each Compute Node before any other Task of the Job.

JobReleaseTask jobReleaseTask()

Get 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.

org.joda.time.DateTime lastModified()

Get this is the last time at which the Job level data, such as the Job state or priority, changed.

Integer maxParallelTasks()

Get the value of maxParallelTasks must be -1 or greater than 0 if specified.

List<MetadataItem> metadata()

Get the Batch service does not assign any meaning to metadata; it is solely for the use of user code.

JobNetworkConfiguration networkConfiguration()

Get the networkConfiguration value.

OnAllTasksComplete onAllTasksComplete()

Get the default is noaction.

OnTaskFailure onTaskFailure()

Get a Task is considered to have failed if has a failureInfo.

PoolInformation poolInfo()

Get the poolInfo value.

JobState previousState()

Get this property is not set if the Job is in its initial Active state.

org.joda.time.DateTime previousStateTransitionTime()

Get this property is not set if the Job is in its initial Active state.

Integer priority()

Get priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority.

JobState state()

Get possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', 'deleting'.

org.joda.time.DateTime stateTransitionTime()

Get the stateTransitionTime value.

JobStatistics stats()

Get this property is populated only if the CloudJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null.

String url()

Get the url value.

Boolean usesTaskDependencies()

Get the usesTaskDependencies value.

CloudJob withAllowTaskPreemption(Boolean allowTaskPreemption)

Set 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.

CloudJob withCommonEnvironmentSettings(List<EnvironmentSetting> commonEnvironmentSettings)

Set individual Tasks can override an environment setting specified here by specifying the same setting name with a different value.

CloudJob withConstraints(JobConstraints constraints)

Set the constraints value.

CloudJob withCreationTime(DateTime creationTime)

Set the creationTime value.

CloudJob withDisplayName(String displayName)

Set the displayName value.

CloudJob withETag(String eTag)

Set this is an opaque string.

CloudJob withExecutionInfo(JobExecutionInformation executionInfo)

Set the executionInfo value.

CloudJob withId(String id)

Set the ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case).

CloudJob withJobManagerTask(JobManagerTask jobManagerTask)

Set the jobManagerTask value.

CloudJob withJobPreparationTask(JobPreparationTask jobPreparationTask)

Set the Job Preparation Task is a special Task run on each Compute Node before any other Task of the Job.

CloudJob withJobReleaseTask(JobReleaseTask jobReleaseTask)

Set 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.

CloudJob withLastModified(DateTime lastModified)

Set this is the last time at which the Job level data, such as the Job state or priority, changed.

CloudJob withMaxParallelTasks(Integer maxParallelTasks)

Set the value of maxParallelTasks must be -1 or greater than 0 if specified.

CloudJob withMetadata(List<MetadataItem> metadata)

Set the Batch service does not assign any meaning to metadata; it is solely for the use of user code.

CloudJob withNetworkConfiguration(JobNetworkConfiguration networkConfiguration)

Set the networkConfiguration value.

CloudJob withOnAllTasksComplete(OnAllTasksComplete onAllTasksComplete)

Set the default is noaction.

CloudJob withOnTaskFailure(OnTaskFailure onTaskFailure)

Set a Task is considered to have failed if has a failureInfo.

CloudJob withPoolInfo(PoolInformation poolInfo)

Set the poolInfo value.

CloudJob withPreviousState(JobState previousState)

Set this property is not set if the Job is in its initial Active state.

CloudJob withPreviousStateTransitionTime(DateTime previousStateTransitionTime)

Set this property is not set if the Job is in its initial Active state.

CloudJob withPriority(Integer priority)

Set priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority.

CloudJob withState(JobState state)

Set possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', 'deleting'.

CloudJob withStateTransitionTime(DateTime stateTransitionTime)

Set the stateTransitionTime value.

CloudJob withStats(JobStatistics stats)

Set this property is populated only if the CloudJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null.

CloudJob withUrl(String url)

Set the url value.

CloudJob withUsesTaskDependencies(Boolean usesTaskDependencies)

Set the usesTaskDependencies value.

Methods inherited from java.lang.Object

Constructor Details

CloudJob

public CloudJob()

Method Details

allowTaskPreemption

public Boolean allowTaskPreemption()

Get 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:

the allowTaskPreemption value

commonEnvironmentSettings

public List commonEnvironmentSettings()

Get individual Tasks can override an environment setting specified here by specifying the same setting name with a different value.

Returns:

the commonEnvironmentSettings value

constraints

public JobConstraints constraints()

Get the constraints value.

Returns:

the constraints value

creationTime

public DateTime creationTime()

Get the creationTime value.

Returns:

the creationTime value

displayName

public String displayName()

Get the displayName value.

Returns:

the displayName value

eTag

public String eTag()

Get 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:

the eTag value

executionInfo

public JobExecutionInformation executionInfo()

Get the executionInfo value.

Returns:

the executionInfo value

id

public String id()

Get 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:

the id value

jobManagerTask

public JobManagerTask jobManagerTask()

Get the jobManagerTask value.

Returns:

the jobManagerTask value

jobPreparationTask

public JobPreparationTask jobPreparationTask()

Get the Job Preparation Task is a special Task run on each Compute Node before any other Task of the Job.

Returns:

the jobPreparationTask value

jobReleaseTask

public JobReleaseTask jobReleaseTask()

Get 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:

the jobReleaseTask value

lastModified

public DateTime lastModified()

Get 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:

the lastModified value

maxParallelTasks

public Integer maxParallelTasks()

Get 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:

the maxParallelTasks value

metadata

public List metadata()

Get the Batch service does not assign any meaning to metadata; it is solely for the use of user code.

Returns:

the metadata value

networkConfiguration

public JobNetworkConfiguration networkConfiguration()

Get the networkConfiguration value.

Returns:

the networkConfiguration value

onAllTasksComplete

public OnAllTasksComplete onAllTasksComplete()

Get the default is noaction. Possible values include: 'noAction', 'terminateJob'.

Returns:

the onAllTasksComplete value

onTaskFailure

public OnTaskFailure onTaskFailure()

Get 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. Possible values include: 'noAction', 'performExitOptionsJobAction'.

Returns:

the onTaskFailure value

poolInfo

public PoolInformation poolInfo()

Get the poolInfo value.

Returns:

the poolInfo value

previousState

public JobState previousState()

Get this property is not set if the Job is in its initial Active state. Possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', 'deleting'.

Returns:

the previousState value

previousStateTransitionTime

public DateTime previousStateTransitionTime()

Get this property is not set if the Job is in its initial Active state.

Returns:

the previousStateTransitionTime value

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.

Returns:

the priority value

state

public JobState state()

Get possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', 'deleting'.

Returns:

the state value

stateTransitionTime

public DateTime stateTransitionTime()

Get the stateTransitionTime value.

Returns:

the stateTransitionTime value

stats

public JobStatistics stats()

Get this property is populated only if the CloudJob 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:

the stats value

url

public String url()

Get the url value.

Returns:

the url value

usesTaskDependencies

public Boolean usesTaskDependencies()

Get the usesTaskDependencies value.

Returns:

the usesTaskDependencies value

withAllowTaskPreemption

public CloudJob withAllowTaskPreemption(Boolean allowTaskPreemption)

Set 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:

allowTaskPreemption - the allowTaskPreemption value to set

Returns:

the CloudJob object itself.

withCommonEnvironmentSettings

public CloudJob withCommonEnvironmentSettings(List commonEnvironmentSettings)

Set individual Tasks can override an environment setting specified here by specifying the same setting name with a different value.

Parameters:

commonEnvironmentSettings - the commonEnvironmentSettings value to set

Returns:

the CloudJob object itself.

withConstraints

public CloudJob withConstraints(JobConstraints constraints)

Set the constraints value.

Parameters:

constraints - the constraints value to set

Returns:

the CloudJob object itself.

withCreationTime

public CloudJob withCreationTime(DateTime creationTime)

Set the creationTime value.

Parameters:

creationTime - the creationTime value to set

Returns:

the CloudJob object itself.

withDisplayName

public CloudJob withDisplayName(String displayName)

Set the displayName value.

Parameters:

displayName - the displayName value to set

Returns:

the CloudJob object itself.

withETag

public CloudJob withETag(String eTag)

Set 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.

Parameters:

eTag - the eTag value to set

Returns:

the CloudJob object itself.

withExecutionInfo

public CloudJob withExecutionInfo(JobExecutionInformation executionInfo)

Set the executionInfo value.

Parameters:

executionInfo - the executionInfo value to set

Returns:

the CloudJob object itself.

withId

public CloudJob withId(String id)

Set the ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case).

Parameters:

id - the id value to set

Returns:

the CloudJob object itself.

withJobManagerTask

public CloudJob withJobManagerTask(JobManagerTask jobManagerTask)

Set the jobManagerTask value.

Parameters:

jobManagerTask - the jobManagerTask value to set

Returns:

the CloudJob object itself.

withJobPreparationTask

public CloudJob withJobPreparationTask(JobPreparationTask jobPreparationTask)

Set the Job Preparation Task is a special Task run on each Compute Node before any other Task of the Job.

Parameters:

jobPreparationTask - the jobPreparationTask value to set

Returns:

the CloudJob object itself.

withJobReleaseTask

public CloudJob withJobReleaseTask(JobReleaseTask jobReleaseTask)

Set 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.

Parameters:

jobReleaseTask - the jobReleaseTask value to set

Returns:

the CloudJob object itself.

withLastModified

public CloudJob withLastModified(DateTime lastModified)

Set 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.

Parameters:

lastModified - the lastModified value to set

Returns:

the CloudJob object itself.

withMaxParallelTasks

public CloudJob withMaxParallelTasks(Integer maxParallelTasks)

Set 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:

maxParallelTasks - the maxParallelTasks value to set

Returns:

the CloudJob object itself.

withMetadata

public CloudJob withMetadata(List metadata)

Set the Batch service does not assign any meaning to metadata; it is solely for the use of user code.

Parameters:

metadata - the metadata value to set

Returns:

the CloudJob object itself.

withNetworkConfiguration

public CloudJob withNetworkConfiguration(JobNetworkConfiguration networkConfiguration)

Set the networkConfiguration value.

Parameters:

networkConfiguration - the networkConfiguration value to set

Returns:

the CloudJob object itself.

withOnAllTasksComplete

public CloudJob withOnAllTasksComplete(OnAllTasksComplete onAllTasksComplete)

Set the default is noaction. Possible values include: 'noAction', 'terminateJob'.

Parameters:

onAllTasksComplete - the onAllTasksComplete value to set

Returns:

the CloudJob object itself.

withOnTaskFailure

public CloudJob withOnTaskFailure(OnTaskFailure onTaskFailure)

Set 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. Possible values include: 'noAction', 'performExitOptionsJobAction'.

Parameters:

onTaskFailure - the onTaskFailure value to set

Returns:

the CloudJob object itself.

withPoolInfo

public CloudJob withPoolInfo(PoolInformation poolInfo)

Set the poolInfo value.

Parameters:

poolInfo - the poolInfo value to set

Returns:

the CloudJob object itself.

withPreviousState

public CloudJob withPreviousState(JobState previousState)

Set this property is not set if the Job is in its initial Active state. Possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', 'deleting'.

Parameters:

previousState - the previousState value to set

Returns:

the CloudJob object itself.

withPreviousStateTransitionTime

public CloudJob withPreviousStateTransitionTime(DateTime previousStateTransitionTime)

Set this property is not set if the Job is in its initial Active state.

Parameters:

previousStateTransitionTime - the previousStateTransitionTime value to set

Returns:

the CloudJob object itself.

withPriority

public CloudJob 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.

Parameters:

priority - the priority value to set

Returns:

the CloudJob object itself.

withState

public CloudJob withState(JobState state)

Set possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', 'deleting'.

Parameters:

state - the state value to set

Returns:

the CloudJob object itself.

withStateTransitionTime

public CloudJob withStateTransitionTime(DateTime stateTransitionTime)

Set the stateTransitionTime value.

Parameters:

stateTransitionTime - the stateTransitionTime value to set

Returns:

the CloudJob object itself.

withStats

public CloudJob withStats(JobStatistics stats)

Set this property is populated only if the CloudJob 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.

Parameters:

stats - the stats value to set

Returns:

the CloudJob object itself.

withUrl

public CloudJob withUrl(String url)

Set the url value.

Parameters:

url - the url value to set

Returns:

the CloudJob object itself.

withUsesTaskDependencies

public CloudJob withUsesTaskDependencies(Boolean usesTaskDependencies)

Set the usesTaskDependencies value.

Parameters:

usesTaskDependencies - the usesTaskDependencies value to set

Returns:

the CloudJob object itself.

Applies to