public class SchedulerTemplate extends Object implements SchedulerOperations
SchedulerOperations
.Modifier and Type | Field and Description |
---|---|
static String |
SCHEDULES_RELATION |
Modifier and Type | Method and Description |
---|---|
ScheduleInfoResource |
getSchedule(String scheduleName)
Retrieves the
ScheduleInfo for the specified ScheduleName for the default platform. |
ScheduleInfoResource |
getSchedule(String scheduleName,
String platform)
Retrieves the
ScheduleInfo for the specified ScheduleName. |
org.springframework.hateoas.PagedModel<ScheduleInfoResource> |
list()
List all of the Schedules for the default platform.
|
org.springframework.hateoas.PagedModel<ScheduleInfoResource> |
list(String taskDefinitionName)
List all of the Schedules associated with the provided TaskDefinition for the default platform.
|
org.springframework.hateoas.PagedModel<ScheduleInfoResource> |
list(String taskDefinitionName,
String platform)
List all of the Schedules associated with the provided TaskDefinition.
|
org.springframework.hateoas.PagedModel<ScheduleInfoResource> |
listByPlatform(String platform)
List all of the schedules registered with the system.
|
void |
schedule(String scheduleName,
String taskDefinitionName,
Map<String,String> taskProperties,
List<String> commandLineArgs)
Schedules the task specified with the taskDefinitionName with the
default platform scheduler.
|
void |
schedule(String scheduleName,
String taskDefinitionName,
Map<String,String> taskProperties,
List<String> commandLineArgs,
String platform)
Schedules the task specified with the taskDefinitionName with the
platform specific scheduler.
|
void |
unschedule(String scheduleName)
Unschedule a schedule that has been created on the default platform.
|
void |
unschedule(String scheduleName,
String platform)
Unschedule a schedule that has been created.
|
public static final String SCHEDULES_RELATION
public void schedule(String scheduleName, String taskDefinitionName, Map<String,String> taskProperties, List<String> commandLineArgs, String platform)
SchedulerOperations
schedule
in interface SchedulerOperations
scheduleName
- A name to be associated with the schedule.taskDefinitionName
- the name of the
TaskDefinition
to be scheduled.taskProperties
- properties required for scheduling or launching a task.commandLineArgs
- the command line args to be used when launching the task.platform
- the name of the platform where the schedule should be created.
If left null or empty the default platform will be used.public void schedule(String scheduleName, String taskDefinitionName, Map<String,String> taskProperties, List<String> commandLineArgs)
SchedulerOperations
schedule
in interface SchedulerOperations
scheduleName
- A name to be associated with the schedule.taskDefinitionName
- the name of the
TaskDefinition
to be scheduled.taskProperties
- properties required for scheduling or launching a task.commandLineArgs
- the command line args to be used when launching the task.public void unschedule(String scheduleName, String platform)
SchedulerOperations
unschedule
in interface SchedulerOperations
scheduleName
- the name of the schedule to be removed.platform
- the name of the platform where the schedule should be created.
If left null or empty the default platform will be used.public void unschedule(String scheduleName)
SchedulerOperations
unschedule
in interface SchedulerOperations
scheduleName
- the name of the schedule to be removed.
If left null or empty and there is only one platform it will be used.public org.springframework.hateoas.PagedModel<ScheduleInfoResource> list(String taskDefinitionName, String platform)
SchedulerOperations
list
in interface SchedulerOperations
taskDefinitionName
- to retrieve Schedules for a specified taskDefinitionName.platform
- the name of the platform where the schedule should be created.
If left null or empty the default platform will be used.public org.springframework.hateoas.PagedModel<ScheduleInfoResource> list(String taskDefinitionName)
SchedulerOperations
list
in interface SchedulerOperations
taskDefinitionName
- to retrieve Schedules for a specified taskDefinitionName.public org.springframework.hateoas.PagedModel<ScheduleInfoResource> listByPlatform(String platform)
SchedulerOperations
listByPlatform
in interface SchedulerOperations
platform
- the name of the platform where the schedule should be created.
If left null or empty the default platform will be used.public org.springframework.hateoas.PagedModel<ScheduleInfoResource> list()
SchedulerOperations
list
in interface SchedulerOperations
public ScheduleInfoResource getSchedule(String scheduleName, String platform)
SchedulerOperations
ScheduleInfo
for the specified ScheduleName.getSchedule
in interface SchedulerOperations
scheduleName
- the name of schedule to retrieve.platform
- the name of the platform where the schedule should be created.
If left null or empty the default platform will be used.ScheduleInfo
for the scheduleName passed in.public ScheduleInfoResource getSchedule(String scheduleName)
SchedulerOperations
ScheduleInfo
for the specified ScheduleName for the default platform.getSchedule
in interface SchedulerOperations
scheduleName
- the name of schedule to retrieve.
If left null or empty and there is only one platform it will be used.ScheduleInfo
for the scheduleName passed in.Copyright © 2024 Pivotal Software, Inc.. All rights reserved.