public class DefaultSchedulerService extends Object implements SchedulerService
SchedulerService interface. Provide service methods
for Scheduling tasks.| Constructor and Description |
|---|
DefaultSchedulerService(CommonApplicationProperties commonApplicationProperties,
List<TaskPlatform> taskPlatforms,
TaskDefinitionRepository taskDefinitionRepository,
AppRegistryService registry,
org.springframework.core.io.ResourceLoader resourceLoader,
TaskConfigurationProperties taskConfigurationProperties,
org.springframework.boot.autoconfigure.jdbc.DataSourceProperties dataSourceProperties,
String dataflowServerUri,
ApplicationConfigurationMetadataResolver metaDataResolver,
SchedulerServiceProperties schedulerServiceProperties,
org.springframework.cloud.dataflow.audit.service.AuditRecordService auditRecordService)
Deprecated.
|
DefaultSchedulerService(CommonApplicationProperties commonApplicationProperties,
List<TaskPlatform> taskPlatforms,
TaskDefinitionRepository taskDefinitionRepository,
AppRegistryService registry,
org.springframework.core.io.ResourceLoader resourceLoader,
TaskConfigurationProperties taskConfigurationProperties,
org.springframework.boot.autoconfigure.jdbc.DataSourceProperties dataSourceProperties,
String dataflowServerUri,
ApplicationConfigurationMetadataResolver metaDataResolver,
SchedulerServiceProperties schedulerServiceProperties,
org.springframework.cloud.dataflow.audit.service.AuditRecordService auditRecordService,
ComposedTaskRunnerConfigurationProperties composedTaskRunnerConfigurationProperties)
Constructor for DefaultSchedulerService
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo |
getSchedule(String scheduleName)
Retrieves the
ScheduleInfo for the specified ScheduleName from the default platform. |
org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo |
getSchedule(String scheduleName,
String platformName)
Retrieves the
ScheduleInfo for the specified ScheduleName. |
protected org.springframework.core.io.Resource |
getTaskResource(String taskDefinitionName) |
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 specified
SchedulerServiceProperties.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(org.springframework.data.domain.Pageable pageable,
String platformName)
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> |
list(String taskDefinitionName)
List all of the Schedules associated with the provided TaskDefinition for the default platform up to the
established maximum as specified
SchedulerServiceProperties.maxSchedulesReturned. |
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 specified
SchedulerServiceProperties.maxSchedulesReturned. |
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 specified
SchedulerServiceProperties.maxSchedulesReturned. |
void |
schedule(String scheduleName,
String taskDefinitionName,
Map<String,String> taskDeploymentProperties,
List<String> commandLineArgs)
Schedules the task specified with the taskDefinitionName with the
default platform specific scheduler.
|
void |
schedule(String scheduleName,
String taskDefinitionName,
Map<String,String> taskDeploymentProperties,
List<String> commandLineArgs,
String platformName)
Schedules the task specified with the taskDefinitionName with the
platform specific scheduler.
|
void |
unschedule(String scheduleName)
Unschedule a schedule that has been created for the default platform.
|
void |
unschedule(String scheduleName,
String platformName)
Unschedule a schedule that has been created.
|
void |
unscheduleForTaskDefinition(String taskDefinitionName)
Unschedule all schedules that have been created for this task definition name.
|
@Deprecated public DefaultSchedulerService(CommonApplicationProperties commonApplicationProperties, List<TaskPlatform> taskPlatforms, TaskDefinitionRepository taskDefinitionRepository, AppRegistryService registry, org.springframework.core.io.ResourceLoader resourceLoader, TaskConfigurationProperties taskConfigurationProperties, org.springframework.boot.autoconfigure.jdbc.DataSourceProperties dataSourceProperties, String dataflowServerUri, ApplicationConfigurationMetadataResolver metaDataResolver, SchedulerServiceProperties schedulerServiceProperties, org.springframework.cloud.dataflow.audit.service.AuditRecordService auditRecordService)
commonApplicationProperties - common properties for applications deployed via Spring Cloud Data Flow.taskPlatforms - the TaskPlatforms for this service.taskDefinitionRepository - the TaskDefinitionRepository for this service.registry - the AppRegistryService for this service.resourceLoader - the ResourceLoader for this service.taskConfigurationProperties - the TaskConfigurationProperties for this service.dataSourceProperties - the DataSourceProperties for this service.dataflowServerUri - the Spring Cloud Data Flow uri for this service.metaDataResolver - the ApplicationConfigurationMetadataResolver for this service.schedulerServiceProperties - the SchedulerServiceProperties for this service.auditRecordService - the AuditRecordService for this service.public DefaultSchedulerService(CommonApplicationProperties commonApplicationProperties, List<TaskPlatform> taskPlatforms, TaskDefinitionRepository taskDefinitionRepository, AppRegistryService registry, org.springframework.core.io.ResourceLoader resourceLoader, TaskConfigurationProperties taskConfigurationProperties, org.springframework.boot.autoconfigure.jdbc.DataSourceProperties dataSourceProperties, String dataflowServerUri, ApplicationConfigurationMetadataResolver metaDataResolver, SchedulerServiceProperties schedulerServiceProperties, org.springframework.cloud.dataflow.audit.service.AuditRecordService auditRecordService, ComposedTaskRunnerConfigurationProperties composedTaskRunnerConfigurationProperties)
commonApplicationProperties - common properties for applications deployed via Spring Cloud Data Flow.taskPlatforms - the TaskPlatforms for this service.taskDefinitionRepository - the TaskDefinitionRepository for this service.registry - the AppRegistryService for this service.resourceLoader - the ResourceLoader for this service.taskConfigurationProperties - the TaskConfigurationProperties for this service.dataSourceProperties - the DataSourceProperties for this service.dataflowServerUri - the Spring Cloud Data Flow uri for this service.metaDataResolver - the ApplicationConfigurationMetadataResolver for this service.schedulerServiceProperties - the SchedulerServiceProperties for this service.auditRecordService - the AuditRecordService for this service.composedTaskRunnerConfigurationProperties - the ComposedTaskRunnerConfigurationProperties for this
servicepublic void schedule(String scheduleName, String taskDefinitionName, Map<String,String> taskDeploymentProperties, List<String> commandLineArgs)
SchedulerServiceschedule in interface SchedulerServicescheduleName - A name to be associated with the schedule.taskDefinitionName - the name of the
TaskDefinition to be scheduled.taskDeploymentProperties - properties required for scheduling or launching a task.commandLineArgs - the command line args to be used when launching the task.public void schedule(String scheduleName, String taskDefinitionName, Map<String,String> taskDeploymentProperties, List<String> commandLineArgs, String platformName)
SchedulerServiceschedule in interface SchedulerServicescheduleName - A name to be associated with the schedule.taskDefinitionName - the name of the
TaskDefinition to be scheduled.taskDeploymentProperties - 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.public void unschedule(String scheduleName, String platformName)
SchedulerServiceunschedule in interface SchedulerServicescheduleName - the name of the schedule to be removed.platformName - the name of the platform from where the schedule will be destroyed.public void unschedule(String scheduleName)
SchedulerServiceunschedule in interface SchedulerServicescheduleName - the name of the schedule to be removed.public void unscheduleForTaskDefinition(String taskDefinitionName)
SchedulerServiceunscheduleForTaskDefinition in interface SchedulerServicetaskDefinitionName - the name of the task definition.public List<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> list(org.springframework.data.domain.Pageable pageable, String taskDefinitionName, String platformName)
SchedulerServicelist in interface SchedulerServicepageable - 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.public org.springframework.data.domain.Page<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> list(org.springframework.data.domain.Pageable pageable,
String platformName)
SchedulerServicelist in interface SchedulerServicepageable - Establish the pagination setup for the result set.platformName - the name of the platform where schedules will be obtained.public org.springframework.data.domain.Page<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> list(org.springframework.data.domain.Pageable pageable)
SchedulerServicelist in interface SchedulerServicepageable - Establish the pagination setup for the result set.public List<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> list(String taskDefinitionName, String platformName)
SchedulerServiceSchedulerServiceProperties.maxSchedulesReturned.list in interface SchedulerServicetaskDefinitionName - to retrieve Schedules for a specified taskDefinitionName.platformName - the name of the platform where schedules will be retrieved.public List<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> list(String taskDefinitionName)
SchedulerServiceSchedulerServiceProperties.maxSchedulesReturned.list in interface SchedulerServicetaskDefinitionName - to retrieve Schedules for a specified taskDefinitionName.public List<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> listForPlatform(String platformName)
SchedulerServiceSchedulerServiceProperties.maxSchedulesReturned.listForPlatform in interface SchedulerServiceplatformName - the name for the platform where schedules will be retrieved.public List<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> list()
SchedulerServiceSchedulerServiceProperties.maxSchedulesReturned.list in interface SchedulerServicepublic org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo getSchedule(String scheduleName, String platformName)
SchedulerServiceScheduleInfo for the specified ScheduleName.getSchedule in interface SchedulerServicescheduleName - the name of schedule to retrieve.platformName - the name of the platform where this schedule will be obtained.ScheduleInfo for the scheduleName passed in.public org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo getSchedule(String scheduleName)
SchedulerServiceScheduleInfo for the specified ScheduleName from the default platform.getSchedule in interface SchedulerServicescheduleName - the name of schedule to retrieve.ScheduleInfo for the scheduleName passed in.protected org.springframework.core.io.Resource getTaskResource(String taskDefinitionName)
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.