Class SchedulerTemplate

java.lang.Object
org.springframework.cloud.dataflow.rest.client.SchedulerTemplate
All Implemented Interfaces:
SchedulerOperations

public class SchedulerTemplate extends Object implements SchedulerOperations
Implementation for SchedulerOperations.
Author:
Glenn Renfro
  • Field Details

  • 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 interface SchedulerOperations
      Parameters:
      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.
    • 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 interface SchedulerOperations
      Parameters:
      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.
    • unschedule

      public void unschedule(String scheduleName, String platform)
      Description copied from interface: SchedulerOperations
      Unschedule a schedule that has been created.
      Specified by:
      unschedule in interface SchedulerOperations
      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

      public void unschedule(String scheduleName)
      Description copied from interface: SchedulerOperations
      Unschedule a schedule that has been created on the default platform.
      Specified by:
      unschedule in interface SchedulerOperations
      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 interface SchedulerOperations
      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

      public org.springframework.hateoas.PagedModel<ScheduleInfoResource> list(String taskDefinitionName)
      Description copied from interface: SchedulerOperations
      List all of the Schedules associated with the provided TaskDefinition for the default platform.
      Specified by:
      list in interface SchedulerOperations
      Parameters:
      taskDefinitionName - to retrieve Schedules for a specified taskDefinitionName.
      Returns:
      A List of Schedules configured for the provided taskDefinitionName.
    • listByPlatform

      public org.springframework.hateoas.PagedModel<ScheduleInfoResource> listByPlatform(String platform)
      Description copied from interface: SchedulerOperations
      List all of the schedules registered with the system.
      Specified by:
      listByPlatform in interface SchedulerOperations
      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

      public org.springframework.hateoas.PagedModel<ScheduleInfoResource> list()
      Description copied from interface: SchedulerOperations
      List all of the Schedules for the default platform.
      Specified by:
      list in interface SchedulerOperations
      Returns:
      A List of Schedules configured for the provided taskDefinitionName.
    • getSchedule

      public ScheduleInfoResource getSchedule(String scheduleName, String platform)
      Description copied from interface: SchedulerOperations
      Retrieves the ScheduleInfo for the specified ScheduleName.
      Specified by:
      getSchedule in interface SchedulerOperations
      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

      public ScheduleInfoResource getSchedule(String scheduleName)
      Description copied from interface: SchedulerOperations
      Retrieves the ScheduleInfo for the specified ScheduleName for the default platform.
      Specified by:
      getSchedule in interface SchedulerOperations
      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.