Class SchedulerTemplate
java.lang.Object
org.springframework.cloud.dataflow.rest.client.SchedulerTemplate
- All Implemented Interfaces:
SchedulerOperations
Implementation for
SchedulerOperations
.- Author:
- Glenn Renfro
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetSchedule
(String scheduleName) Retrieves theScheduleInfo
for the specified ScheduleName for the default platform.getSchedule
(String scheduleName, String platform) Retrieves theScheduleInfo
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 all of the Schedules associated with the provided TaskDefinition for the default platform.org.springframework.hateoas.PagedModel<ScheduleInfoResource>
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.
-
Field Details
-
SCHEDULES_RELATION
- See Also:
-
-
Method Details
-
schedule
public void schedule(String scheduleName, String taskDefinitionName, Map<String, String> taskProperties, List<String> commandLineArgs, String platform) Description copied from interface:SchedulerOperations
Schedules the task specified with the taskDefinitionName with the platform specific scheduler. To setup the task with the scheduler set the properties required to process the schedule within the taskProperties map. Each scheduler property should be prefixed with "spring.cloud.scheduler.". The schedule expression (cron for example) are specified within the task properties using the "spring.cloud.scheduler.cron.expression" as the key and the associated value would be the cron expression to be used.- Specified by:
schedule
in interfaceSchedulerOperations
- Parameters:
scheduleName
- A name to be associated with the schedule.taskDefinitionName
- the name of theTaskDefinition
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.
-
schedule
public void schedule(String scheduleName, String taskDefinitionName, Map<String, String> taskProperties, List<String> commandLineArgs) Description copied from interface:SchedulerOperations
Schedules the task specified with the taskDefinitionName with the default platform scheduler. To setup the task with the scheduler set the properties required to process the schedule within the taskProperties map. Each scheduler property should be prefixed with "spring.cloud.scheduler.". The schedule expression (cron for example) are specified within the task properties using the "spring.cloud.scheduler.cron.expression" as the key and the associated value would be the cron expression to be used.- Specified by:
schedule
in interfaceSchedulerOperations
- Parameters:
scheduleName
- A name to be associated with the schedule.taskDefinitionName
- the name of theTaskDefinition
to be scheduled.taskProperties
- properties required for scheduling or launching a task.commandLineArgs
- the command line args to be used when launching the task.
-
unschedule
Description copied from interface:SchedulerOperations
Unschedule a schedule that has been created.- Specified by:
unschedule
in interfaceSchedulerOperations
- Parameters:
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.
-
unschedule
Description copied from interface:SchedulerOperations
Unschedule a schedule that has been created on the default platform.- Specified by:
unschedule
in interfaceSchedulerOperations
- Parameters:
scheduleName
- the name of the schedule to be removed. If left null or empty and there is only one platform it will be used.
-
list
public org.springframework.hateoas.PagedModel<ScheduleInfoResource> list(String taskDefinitionName, String platform) Description copied from interface:SchedulerOperations
List all of the Schedules associated with the provided TaskDefinition.- Specified by:
list
in interfaceSchedulerOperations
- Parameters:
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.- Returns:
- A List of Schedules configured for the provided taskDefinitionName.
-
list
Description copied from interface:SchedulerOperations
List all of the Schedules associated with the provided TaskDefinition for the default platform.- Specified by:
list
in interfaceSchedulerOperations
- Parameters:
taskDefinitionName
- to retrieve Schedules for a specified taskDefinitionName.- Returns:
- A List of Schedules configured for the provided taskDefinitionName.
-
listByPlatform
Description copied from interface:SchedulerOperations
List all of the schedules registered with the system.- Specified by:
listByPlatform
in interfaceSchedulerOperations
- Parameters:
platform
- the name of the platform where the schedule should be created. If left null or empty the default platform will be used.- Returns:
- A List of Schedules for the given system.
-
list
Description copied from interface:SchedulerOperations
List all of the Schedules for the default platform.- Specified by:
list
in interfaceSchedulerOperations
- Returns:
- A List of Schedules configured for the provided taskDefinitionName.
-
getSchedule
Description copied from interface:SchedulerOperations
Retrieves theScheduleInfo
for the specified ScheduleName.- Specified by:
getSchedule
in interfaceSchedulerOperations
- Parameters:
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.- Returns:
ScheduleInfo
for the scheduleName passed in.
-
getSchedule
Description copied from interface:SchedulerOperations
Retrieves theScheduleInfo
for the specified ScheduleName for the default platform.- Specified by:
getSchedule
in interfaceSchedulerOperations
- Parameters:
scheduleName
- the name of schedule to retrieve. If left null or empty and there is only one platform it will be used.- Returns:
ScheduleInfo
for the scheduleName passed in.
-