Interface SchedulerService
- All Known Implementing Classes:
DefaultSchedulerService
public interface SchedulerService
Provides Scheduler related services.
- Author:
- Glenn Renfro
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.cloud.deployer.spi.scheduler.ScheduleInfogetSchedule(String scheduleName) Retrieves theScheduleInfofor the specified ScheduleName from the default platform.org.springframework.cloud.deployer.spi.scheduler.ScheduleInfogetSchedule(String scheduleName, String platformName) Retrieves theScheduleInfofor the specified ScheduleName.List<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo>list()List all of the schedules registered with the default platform up to the established maximum as specifiedSchedulerServiceProperties.maxSchedulesReturned.List<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo>List all of the Schedules associated with the provided TaskDefinition for the default platform up to the established maximum as specifiedSchedulerServiceProperties.maxSchedulesReturned.List<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo>List all of the Schedules associated with the provided TaskDefinition up to the established maximum as specifiedSchedulerServiceProperties.maxSchedulesReturned.org.springframework.data.domain.Page<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo>list(org.springframework.data.domain.Pageable pageable) List all of the schedules registered with the default platform.org.springframework.data.domain.Page<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo>List all of the schedules registered with the system.List<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo>list(org.springframework.data.domain.Pageable pageable, String taskDefinitionName, String platformName) List all of the Schedules associated with the provided TaskDefinition.List<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo>listForPlatform(String platformName) List all of the schedules registered with the system up to the established maximum as specifiedSchedulerServiceProperties.maxSchedulesReturned.voidschedule(String scheduleName, String taskDefinitionName, Map<String, String> taskProperties, List<String> commandLineArgs) Schedules the task specified with the taskDefinitionName with the default platform specific scheduler.voidschedule(String scheduleName, String taskDefinitionName, Map<String, String> taskProperties, List<String> commandLineArgs, String platformName) Schedules the task specified with the taskDefinitionName with the platform specific scheduler.voidunschedule(String scheduleName) Unschedule a schedule that has been created for the default platform.voidunschedule(String scheduleName, String platformName) Unschedule a schedule that has been created.voidunscheduleForTaskDefinition(String taskDefinitionName) Unschedule all schedules that have been created for this task definition name.
-
Method Details
-
schedule
void schedule(String scheduleName, String taskDefinitionName, Map<String, String> taskProperties, List<String> commandLineArgs, String platformName) 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.- Parameters:
scheduleName- A name to be associated with the schedule.taskDefinitionName- the name of theTaskDefinitionto be scheduled.taskProperties- properties required for scheduling or launching a task.commandLineArgs- the command line args to be used when launching the task.platformName- the name of the platform where the schedule should be created.
-
schedule
void schedule(String scheduleName, String taskDefinitionName, Map<String, String> taskProperties, List<String> commandLineArgs) Schedules the task specified with the taskDefinitionName with the default 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.- Parameters:
scheduleName- A name to be associated with the schedule.taskDefinitionName- the name of theTaskDefinitionto be scheduled.taskProperties- properties required for scheduling or launching a task.commandLineArgs- the command line args to be used when launching the task.
-
unschedule
Unschedule a schedule that has been created for the default platform.- Parameters:
scheduleName- the name of the schedule to be removed.
-
unschedule
Unschedule a schedule that has been created.- Parameters:
scheduleName- the name of the schedule to be removed.platformName- the name of the platform from where the schedule will be destroyed.
-
unscheduleForTaskDefinition
Unschedule all schedules that have been created for this task definition name.- Parameters:
taskDefinitionName- the name of the task definition.
-
list
List<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> list(org.springframework.data.domain.Pageable pageable, String taskDefinitionName, String platformName) List all of the Schedules associated with the provided TaskDefinition.- Parameters:
pageable- Establish the pagination setup for the result set.taskDefinitionName- to retrieve Schedules for a specified taskDefinitionName.platformName- name of platform from which the schedules will be retrieved.- Returns:
- A List of Schedules configured for the provided taskDefinitionName.
-
list
org.springframework.data.domain.Page<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> list(org.springframework.data.domain.Pageable pageable, String platformName) List all of the schedules registered with the system.- Parameters:
pageable- Establish the pagination setup for the result set.platformName- the name of the platform where schedules will be obtained.- Returns:
- Paged items of schedules.
-
list
org.springframework.data.domain.Page<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> list(org.springframework.data.domain.Pageable pageable) List all of the schedules registered with the default platform.- Parameters:
pageable- Establish the pagination setup for the result set.- Returns:
- Paged items of schedules.
-
list
List<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> list(String taskDefinitionName, String platformName) List all of the Schedules associated with the provided TaskDefinition up to the established maximum as specifiedSchedulerServiceProperties.maxSchedulesReturned.- Parameters:
taskDefinitionName- to retrieve Schedules for a specified taskDefinitionName.platformName- the name of the platform where schedules will be retrieved.- Returns:
- A List of Schedules configured for the provided taskDefinitionName.
-
list
List all of the Schedules associated with the provided TaskDefinition for the default platform up to the established maximum as specifiedSchedulerServiceProperties.maxSchedulesReturned.- Parameters:
taskDefinitionName- to retrieve Schedules for a specified taskDefinitionName.- Returns:
- A List of Schedules configured for the provided taskDefinitionName.
-
listForPlatform
List<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> listForPlatform(String platformName) List all of the schedules registered with the system up to the established maximum as specifiedSchedulerServiceProperties.maxSchedulesReturned.- Parameters:
platformName- the name for the platform where schedules will be retrieved.- Returns:
- A List of Schedules for the given system.
-
list
List<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> list()List all of the schedules registered with the default platform up to the established maximum as specifiedSchedulerServiceProperties.maxSchedulesReturned.- Returns:
- A List of Schedules for the given system.
-
getSchedule
org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo getSchedule(String scheduleName, String platformName) Retrieves theScheduleInfofor the specified ScheduleName.- Parameters:
scheduleName- the name of schedule to retrieve.platformName- the name of the platform where this schedule will be obtained.- Returns:
ScheduleInfofor the scheduleName passed in.
-
getSchedule
Retrieves theScheduleInfofor the specified ScheduleName from the default platform.- Parameters:
scheduleName- the name of schedule to retrieve.- Returns:
ScheduleInfofor the scheduleName passed in.
-