JobOperations Class
- java.
lang. Object - IInheritedBehaviors
- com.
microsoft. azure. batch. JobOperations
- com.
public class JobOperations implements IInheritedBehaviors
Performs job-related operations on an Azure Batch account.
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
createJob(JobAddParameter job)
Adds a job to the Batch account. |
void |
createJob(JobAddParameter job, Iterable<BatchClientBehavior> additionalBehaviors)
Adds a job to the Batch account. |
void |
createJob(String jobId, PoolInformation poolInfo)
Adds a job to the Batch account. |
void |
createJob(String jobId, PoolInformation poolInfo, Iterable<BatchClientBehavior> additionalBehaviors)
Adds a job to the Batch account. |
Collection<Batch |
customBehaviors()
Gets a collection of behaviors that modify or customize requests to the Batch service. |
void |
deleteJob(String jobId)
Deletes the specified job. |
void |
deleteJob(String jobId, Iterable<BatchClientBehavior> additionalBehaviors)
Deletes the specified job. |
void |
disableJob(String jobId, DisableJobOption disableJobOption)
Disables the specified job. Disabled jobs do not run new tasks, but may be re-enabled later. |
void |
disableJob(String jobId, DisableJobOption disableJobOption, Iterable<BatchClientBehavior> additionalBehaviors)
Disables the specified job. Disabled jobs do not run new tasks, but may be re-enabled later. |
void |
enableJob(String jobId)
Enables the specified job, allowing new tasks to run. |
void |
enableJob(String jobId, Iterable<BatchClientBehavior> additionalBehaviors)
Enables the specified job, allowing new tasks to run. |
Job |
getAllJobsLifetimeStatistics()
Gets lifetime summary statistics for all of the jobs in the current account. |
Job |
getAllJobsLifetimeStatistics(Iterable<BatchClientBehavior> additionalBehaviors)
Gets lifetime summary statistics for all of the jobs in the current account. |
Cloud |
getJob(String jobId)
Gets the specified CloudJob. |
Cloud |
getJob(String jobId, DetailLevel detailLevel)
Gets the specified CloudJob. |
Cloud |
getJob(String jobId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors)
Gets the specified CloudJob. |
Task |
getTaskCounts(String jobId)
Gets the task counts for the specified job. Task counts provide a count of the tasks by active, running or completed task state, and a count of tasks which succeeded or failed. Tasks in the preparing state are counted as running. |
Task |
getTaskCounts(String jobId, Iterable<BatchClientBehavior> additionalBehaviors)
Gets the task counts for the specified job. Task counts provide a count of the tasks by active, running or completed task state, and a count of tasks which succeeded or failed. Tasks in the preparing state are counted as running. |
PagedList<Cloud |
listJobs()
Lists the jobs in the Batch account. |
PagedList<Cloud |
listJobs(DetailLevel detailLevel)
Lists the jobs in the Batch account. |
PagedList<Cloud |
listJobs(DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors)
Lists the jobs in the Batch account. |
PagedList<Cloud |
listJobs(String jobScheduleId)
Lists the jobs created under the specified job schedule. |
PagedList<Cloud |
listJobs(String jobScheduleId, DetailLevel detailLevel)
Lists the jobs created under the specified job schedule. |
PagedList<Cloud |
listJobs(String jobScheduleId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors)
Lists the jobs created under the specified jobSchedule. |
PagedList<Job |
listPreparationAndReleaseTaskStatus(String jobId)
Lists the status of JobPreparationTask and JobReleaseTask tasks for the specified job. |
PagedList<Job |
listPreparationAndReleaseTaskStatus(String jobId, Iterable<BatchClientBehavior> additionalBehaviors)
Lists the status of JobPreparationTask and JobReleaseTask tasks for the specified job. |
void |
patchJob(String jobId, JobPatchParameter jobPatchParameter)
Updates the specified job. This method only replaces the properties specified with non-null values. |
void |
patchJob(String jobId, JobPatchParameter jobPatchParameter, Iterable<BatchClientBehavior> additionalBehaviors)
Updates the specified job. This method only replaces the properties specified with non-null values. |
void |
patchJob(String jobId, OnAllTasksComplete onAllTasksComplete)
Updates the specified job. This method only replaces the properties specified with non-null values. |
void |
patchJob(String jobId, PoolInformation poolInfo)
Updates the specified job. This method only replaces the properties specified with non-null values. |
void |
patchJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List<MetadataItem> metadata)
Updates the specified job. This method only replaces the properties specified with non-null values. |
void |
patchJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors)
Updates the specified job. This method only replaces the properties specified with non-null values. |
void |
terminateJob(String jobId)
Terminates the specified job, marking it as completed. |
void |
terminateJob(String jobId, String terminateReason)
Terminates the specified job, marking it as completed. |
void |
terminateJob(String jobId, String terminateReason, Iterable<BatchClientBehavior> additionalBehaviors)
Terminates the specified job, marking it as completed. |
void |
updateJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List<MetadataItem> metadata)
Updates the specified job. This method performs a full replace of all updatable properties of the job. For example, if the constraints parameter is null, then the Batch service removes the job's existing constraints and replaces them with the default constraints. |
void |
updateJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors)
Updates the specified job. This method performs a full replace of all updatable properties of the job. For example, if the constraints parameter is null, then the Batch service removes the job's existing constraints and replaces them with the default constraints. |
IInherited |
withCustomBehaviors(Collection<BatchClientBehavior> behaviors)
Sets a collection of behaviors that modify or customize requests to the Batch service. |
Method Details
createJob
public void createJob(JobAddParameter job)
Adds a job to the Batch account.
Parameters:
Throws:
createJob
public void createJob(JobAddParameter job, Iterable
Adds a job to the Batch account.
Parameters:
Throws:
createJob
public void createJob(String jobId, PoolInformation poolInfo)
Adds a job to the Batch account.
Parameters:
Throws:
createJob
public void createJob(String jobId, PoolInformation poolInfo, Iterable
Adds a job to the Batch account.
Parameters:
Throws:
customBehaviors
public Collection
Gets a collection of behaviors that modify or customize requests to the Batch service.
Overrides:
JobOperations.customBehaviors()Returns:
deleteJob
public void deleteJob(String jobId)
Deletes the specified job.
Parameters:
Throws:
deleteJob
public void deleteJob(String jobId, Iterable
Deletes the specified job.
Parameters:
Throws:
disableJob
public void disableJob(String jobId, DisableJobOption disableJobOption)
Disables the specified job. Disabled jobs do not run new tasks, but may be re-enabled later.
Parameters:
Throws:
disableJob
public void disableJob(String jobId, DisableJobOption disableJobOption, Iterable
Disables the specified job. Disabled jobs do not run new tasks, but may be re-enabled later.
Parameters:
Throws:
enableJob
public void enableJob(String jobId)
Enables the specified job, allowing new tasks to run.
Parameters:
Throws:
enableJob
public void enableJob(String jobId, Iterable
Enables the specified job, allowing new tasks to run.
Parameters:
Throws:
getAllJobsLifetimeStatistics
public JobStatistics getAllJobsLifetimeStatistics()
Gets lifetime summary statistics for all of the jobs in the current account.
Returns:
Throws:
getAllJobsLifetimeStatistics
public JobStatistics getAllJobsLifetimeStatistics(Iterable
Gets lifetime summary statistics for all of the jobs in the current account.
Parameters:
Returns:
Throws:
getJob
public CloudJob getJob(String jobId)
Gets the specified CloudJob.
Parameters:
Returns:
Throws:
getJob
public CloudJob getJob(String jobId, DetailLevel detailLevel)
Gets the specified CloudJob.
Parameters:
Returns:
Throws:
getJob
public CloudJob getJob(String jobId, DetailLevel detailLevel, Iterable
Gets the specified CloudJob.
Parameters:
Returns:
Throws:
getTaskCounts
public TaskCounts getTaskCounts(String jobId)
Gets the task counts for the specified job. Task counts provide a count of the tasks by active, running or completed task state, and a count of tasks which succeeded or failed. Tasks in the preparing state are counted as running.
Parameters:
Returns:
Throws:
getTaskCounts
public TaskCounts getTaskCounts(String jobId, Iterable
Gets the task counts for the specified job. Task counts provide a count of the tasks by active, running or completed task state, and a count of tasks which succeeded or failed. Tasks in the preparing state are counted as running.
Parameters:
Returns:
Throws:
listJobs
public PagedList
Lists the jobs in the Batch account.
Returns:
Throws:
listJobs
public PagedList
Lists the jobs in the Batch account.
Parameters:
Returns:
Throws:
listJobs
public PagedList
Lists the jobs in the Batch account.
Parameters:
Returns:
Throws:
listJobs
public PagedList
Lists the jobs created under the specified job schedule.
Parameters:
Returns:
Throws:
listJobs
public PagedList
Lists the jobs created under the specified job schedule.
Parameters:
Returns:
Throws:
listJobs
public PagedList
Lists the jobs created under the specified jobSchedule.
Parameters:
Returns:
Throws:
listPreparationAndReleaseTaskStatus
public PagedList
Lists the status of JobPreparationTask and JobReleaseTask tasks for the specified job.
Parameters:
Returns:
Throws:
listPreparationAndReleaseTaskStatus
public PagedList
Lists the status of JobPreparationTask and JobReleaseTask tasks for the specified job.
Parameters:
Returns:
Throws:
patchJob
public void patchJob(String jobId, JobPatchParameter jobPatchParameter)
Updates the specified job. This method only replaces the properties specified with non-null values.
Parameters:
Throws:
patchJob
public void patchJob(String jobId, JobPatchParameter jobPatchParameter, Iterable
Updates the specified job. This method only replaces the properties specified with non-null values.
Parameters:
Throws:
patchJob
public void patchJob(String jobId, OnAllTasksComplete onAllTasksComplete)
Updates the specified job. This method only replaces the properties specified with non-null values.
Parameters:
Throws:
patchJob
public void patchJob(String jobId, PoolInformation poolInfo)
Updates the specified job. This method only replaces the properties specified with non-null values.
Parameters:
Throws:
patchJob
public void patchJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List
Updates the specified job. This method only replaces the properties specified with non-null values.
Parameters:
Throws:
patchJob
public void patchJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List
Updates the specified job. This method only replaces the properties specified with non-null values.
Parameters:
Throws:
terminateJob
public void terminateJob(String jobId)
Terminates the specified job, marking it as completed.
Parameters:
Throws:
terminateJob
public void terminateJob(String jobId, String terminateReason)
Terminates the specified job, marking it as completed.
Parameters:
Throws:
terminateJob
public void terminateJob(String jobId, String terminateReason, Iterable
Terminates the specified job, marking it as completed.
Parameters:
Throws:
updateJob
public void updateJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List
Updates the specified job. This method performs a full replace of all updatable properties of the job. For example, if the constraints parameter is null, then the Batch service removes the job's existing constraints and replaces them with the default constraints.
Parameters:
Throws:
updateJob
public void updateJob(String jobId, PoolInformation poolInfo, Integer priority, JobConstraints constraints, OnAllTasksComplete onAllTasksComplete, List
Updates the specified job. This method performs a full replace of all updatable properties of the job. For example, if the constraints parameter is null, then the Batch service removes the job's existing constraints and replaces them with the default constraints.
Parameters:
Throws:
withCustomBehaviors
public IInheritedBehaviors withCustomBehaviors(Collection
Sets a collection of behaviors that modify or customize requests to the Batch service.
Overrides:
JobOperations.withCustomBehaviors(Collection<BatchClientBehavior> behaviors)Parameters:
Returns: