JobScheduleOperations Class

  • java.lang.Object
    • com.microsoft.azure.batch.JobScheduleOperations

Implements

public class JobScheduleOperations
implements IInheritedBehaviors

Performs job schedule-related operations on an Azure Batch account.

Method Summary

Modifier and Type Method and Description
void createJobSchedule(JobScheduleAddParameter jobSchedule)

Adds a job schedule to the Batch account.

void createJobSchedule(JobScheduleAddParameter jobSchedule, Iterable<BatchClientBehavior> additionalBehaviors)

Adds a job schedule to the Batch account.

void createJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification)

Adds a job schedule to the Batch account.

void createJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, Iterable<BatchClientBehavior> additionalBehaviors)

Adds a job schedule to the Batch account.

Collection<BatchClientBehavior> customBehaviors()

Gets a collection of behaviors that modify or customize requests to the Batch service.

void deleteJobSchedule(String jobScheduleId)

Deletes the specified job schedule.

void deleteJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors)

Deletes the specified job schedule.

void disableJobSchedule(String jobScheduleId)

Disables the specified job schedule.

void disableJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors)

Disables the specified job schedule.

void enableJobSchedule(String jobScheduleId)

Enables the specified job schedule, allowing jobs to be created according to its Schedule.

void enableJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors)

Enables the specified job schedule, allowing jobs to be created according to its Schedule.

boolean existsJobSchedule(String jobScheduleId)

Checks whether the specified job schedule exists.

boolean existsJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors)

Checks whether the specified job schedule exists.

CloudJobSchedule getJobSchedule(String jobScheduleId)

Gets the specified CloudJobSchedule.

CloudJobSchedule getJobSchedule(String jobScheduleId, DetailLevel detailLevel)

Gets the specified CloudJobSchedule.

CloudJobSchedule getJobSchedule(String jobScheduleId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors)

Gets the specified CloudJobSchedule.

com.microsoft.azure.PagedList<CloudJobSchedule> listJobSchedules()

Lists the CloudJobSchedule in the Batch account.

com.microsoft.azure.PagedList<CloudJobSchedule> listJobSchedules(DetailLevel detailLevel)

Lists the CloudJobSchedule in the Batch account.

com.microsoft.azure.PagedList<CloudJobSchedule> listJobSchedules(DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors)

Lists the CloudJobSchedule in the Batch account.

void patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification)

Updates the specified job schedule.

void patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata)

Updates the specified job schedule.

void patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors)

Updates the specified job schedule.

void terminateJobSchedule(String jobScheduleId)

Terminates the specified job schedule.

void terminateJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors)

Terminates the specified job schedule.

void updateJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification)

Updates the specified job schedule.

void updateJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata)

Updates the specified job schedule.

void updateJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors)

Updates the specified job schedule.

IInheritedBehaviors withCustomBehaviors(Collection<BatchClientBehavior> behaviors)

Sets a collection of behaviors that modify or customize requests to the Batch service.

Methods inherited from java.lang.Object

Method Details

createJobSchedule

public void createJobSchedule(JobScheduleAddParameter jobSchedule)

Adds a job schedule to the Batch account.

Parameters:

jobSchedule - The job schedule to be added.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

createJobSchedule

public void createJobSchedule(JobScheduleAddParameter jobSchedule, Iterable additionalBehaviors)

Adds a job schedule to the Batch account.

Parameters:

jobSchedule - The job schedule to be added.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

createJobSchedule

public void createJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification)

Adds a job schedule to the Batch account.

Parameters:

jobScheduleId - A string that uniquely identifies the job schedule within the account.
schedule - The schedule according to which jobs will be created.
jobSpecification - Details about the jobs to be created on this schedule.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

createJobSchedule

public void createJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, Iterable additionalBehaviors)

Adds a job schedule to the Batch account.

Parameters:

jobScheduleId - A string that uniquely identifies the job schedule within the account.
schedule - The schedule according to which jobs will be created.
jobSpecification - Details about the jobs to be created on this schedule.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

customBehaviors

public Collection customBehaviors()

Gets a collection of behaviors that modify or customize requests to the Batch service.

Returns:

A collection of BatchClientBehavior instances.

deleteJobSchedule

public void deleteJobSchedule(String jobScheduleId)

Deletes the specified job schedule.

Parameters:

jobScheduleId - The ID of the job schedule.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

deleteJobSchedule

public void deleteJobSchedule(String jobScheduleId, Iterable additionalBehaviors)

Deletes the specified job schedule.

Parameters:

jobScheduleId - The ID of the job schedule.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

disableJobSchedule

public void disableJobSchedule(String jobScheduleId)

Disables the specified job schedule. Disabled schedules do not create new jobs, but may be re-enabled later.

Parameters:

jobScheduleId - The ID of the job schedule.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

disableJobSchedule

public void disableJobSchedule(String jobScheduleId, Iterable additionalBehaviors)

Disables the specified job schedule. Disabled schedules do not create new jobs, but may be re-enabled later.

Parameters:

jobScheduleId - The ID of the job schedule.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

enableJobSchedule

public void enableJobSchedule(String jobScheduleId)

Enables the specified job schedule, allowing jobs to be created according to its Schedule.

Parameters:

jobScheduleId - The ID of the job schedule.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

enableJobSchedule

public void enableJobSchedule(String jobScheduleId, Iterable additionalBehaviors)

Enables the specified job schedule, allowing jobs to be created according to its Schedule.

Parameters:

jobScheduleId - The ID of the job schedule.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

existsJobSchedule

public boolean existsJobSchedule(String jobScheduleId)

Checks whether the specified job schedule exists.

Parameters:

jobScheduleId - The ID of the job schedule which you want to check.

Returns:

True if the specified job schedule exists; otherwise, false.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

existsJobSchedule

public boolean existsJobSchedule(String jobScheduleId, Iterable additionalBehaviors)

Checks whether the specified job schedule exists.

Parameters:

jobScheduleId - The ID of the job schedule which you want to check.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

True if the specified job schedule exists; otherwise, false.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getJobSchedule

public CloudJobSchedule getJobSchedule(String jobScheduleId)

Gets the specified CloudJobSchedule.

Parameters:

jobScheduleId - The ID of the job schedule.

Returns:

A CloudJobSchedule containing information about the specified Azure Batch job schedule.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getJobSchedule

public CloudJobSchedule getJobSchedule(String jobScheduleId, DetailLevel detailLevel)

Gets the specified CloudJobSchedule.

Parameters:

jobScheduleId - The ID of the job schedule.
detailLevel - A DetailLevel used for controlling which properties are retrieved from the service.

Returns:

A CloudJobSchedule containing information about the specified Azure Batch job schedule.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

getJobSchedule

public CloudJobSchedule getJobSchedule(String jobScheduleId, DetailLevel detailLevel, Iterable additionalBehaviors)

Gets the specified CloudJobSchedule.

Parameters:

jobScheduleId - The ID of the job schedule.
detailLevel - A DetailLevel used for controlling which properties are retrieved from the service.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

A CloudJobSchedule containing information about the specified Azure Batch job schedule.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listJobSchedules

public PagedList listJobSchedules()

Lists the CloudJobSchedule in the Batch account.

Returns:

A list of CloudJobSchedule objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listJobSchedules

public PagedList listJobSchedules(DetailLevel detailLevel)

Lists the CloudJobSchedule in the Batch account.

Parameters:

detailLevel - A DetailLevel used for filtering the list and for controlling which properties are retrieved from the service.

Returns:

A list of CloudJobSchedule objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

listJobSchedules

public PagedList listJobSchedules(DetailLevel detailLevel, Iterable additionalBehaviors)

Lists the CloudJobSchedule in the Batch account.

Parameters:

detailLevel - A DetailLevel used for filtering the list and for controlling which properties are retrieved from the service.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Returns:

A list of CloudJobSchedule objects.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

patchJobSchedule

public void patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification)

Updates the specified job schedule. This method only replaces the properties specified with non-null values.

Parameters:

jobScheduleId - The ID of the job schedule.
schedule - The schedule according to which jobs will be created. If null, any existing schedule is left unchanged.
jobSpecification - The details of the jobs to be created on this schedule. Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification. If null, the existing job specification is left unchanged.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

patchJobSchedule

public void patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List metadata)

Updates the specified job schedule. This method only replaces the properties specified with non-null values.

Parameters:

jobScheduleId - The ID of the job schedule. If null, any existing schedule is left unchanged.
schedule - The schedule according to which jobs will be created.
jobSpecification - The details of the jobs to be created on this schedule. Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification. If null, the existing job specification is left unchanged.
metadata - A list of name-value pairs associated with the job schedule as metadata. If null, the existing metadata are left unchanged.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

patchJobSchedule

public void patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List metadata, Iterable additionalBehaviors)

Updates the specified job schedule. This method only replaces the properties specified with non-null values.

Parameters:

jobScheduleId - The ID of the job schedule.
schedule - The schedule according to which jobs will be created. If null, any existing schedule is left unchanged.
jobSpecification - The details of the jobs to be created on this schedule. Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification. If null, the existing job specification is left unchanged.
metadata - A list of name-value pairs associated with the job schedule as metadata. If null, the existing metadata are left unchanged.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

terminateJobSchedule

public void terminateJobSchedule(String jobScheduleId)

Terminates the specified job schedule.

Parameters:

jobScheduleId - The ID of the job schedule.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

terminateJobSchedule

public void terminateJobSchedule(String jobScheduleId, Iterable additionalBehaviors)

Terminates the specified job schedule.

Parameters:

jobScheduleId - The ID of the job schedule.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

updateJobSchedule

public void updateJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification)

Updates the specified job schedule. This method performs a full replace of all the updatable properties of the job schedule. For example, if the schedule parameter is null, then the Batch service removes the job schedule\u2019s existing schedule and replaces it with the default schedule.

Parameters:

jobScheduleId - The ID of the job schedule.
schedule - The schedule according to which jobs will be created. If null, it is equivalent to passing the default schedule: that is, a single job scheduled to run immediately.
jobSpecification - The details of the jobs to be created on this schedule. Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

updateJobSchedule

public void updateJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List metadata)

Updates the specified job schedule. This method performs a full replace of all the updatable properties of the job schedule. For example, if the schedule parameter is null, then the Batch service removes the job schedule\u2019s existing schedule and replaces it with the default schedule.

Parameters:

jobScheduleId - The ID of the job schedule.
schedule - The schedule according to which jobs will be created. If null, it is equivalent to passing the default schedule: that is, a single job scheduled to run immediately.
jobSpecification - The details of the jobs to be created on this schedule. Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification.
metadata - A list of name-value pairs associated with the job schedule as metadata. If null, it takes the default value of an empty list; in effect, any existing metadata is deleted.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

updateJobSchedule

public void updateJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List metadata, Iterable additionalBehaviors)

Updates the specified job schedule. This method performs a full replace of all the updatable properties of the job schedule. For example, if the schedule parameter is null, then the Batch service removes the job schedule\u2019s existing schedule and replaces it with the default schedule.

Parameters:

jobScheduleId - The ID of the job schedule.
schedule - The schedule according to which jobs will be created. If null, it is equivalent to passing the default schedule: that is, a single job scheduled to run immediately.
jobSpecification - The details of the jobs to be created on this schedule. Updates affect only jobs that are started after the update has taken place. Any currently active job continues with the older specification.
metadata - A list of name-value pairs associated with the job schedule as metadata. If null, it takes the default value of an empty list; in effect, any existing metadata is deleted.
additionalBehaviors - A collection of BatchClientBehavior instances that are applied to the Batch service request.

Throws:

BatchErrorException - Exception thrown when an error response is received from the Batch service.

IOException

- Exception thrown when an error response is received from the Batch service.

withCustomBehaviors

public IInheritedBehaviors withCustomBehaviors(Collection behaviors)

Sets a collection of behaviors that modify or customize requests to the Batch service.

Parameters:

behaviors - The collection of BatchClientBehavior instances.

Returns:

The current instance.

Applies to