@RestController @RequestMapping(value="/tasks/schedules") @ExposesResourceFor(value=ScheduleInfoResource.class) public class TaskSchedulerController extends Object
ScheduleInfo
. This includes CRUD operations.Constructor and Description |
---|
TaskSchedulerController(SchedulerService schedulerService)
Create a
TaskSchedulerController that delegates
task scheduling operations via SchedulerService
|
Modifier and Type | Method and Description |
---|---|
void |
deleteSchedulesforDefinition(String taskDefinitionName)
Remove schedules for a specific
TaskDefinition name . |
org.springframework.hateoas.PagedModel<ScheduleInfoResource> |
filteredList(String taskDefinitionName,
String platform,
org.springframework.data.web.PagedResourcesAssembler<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> assembler)
Return a page-able list of
ScheduleInfo s for a specific
TaskDefinition name. |
ScheduleInfoResource |
getSchedule(String scheduleName,
String platform)
Return a
ScheduleInfo for a specific Schedule. |
org.springframework.hateoas.PagedModel<ScheduleInfoResource> |
list(org.springframework.data.domain.Pageable pageable,
String platform,
org.springframework.data.web.PagedResourcesAssembler<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> assembler)
Return a page-able list of
ScheduleInfo s. |
void |
save(String scheduleName,
String taskDefinitionName,
String properties,
String arguments,
String platform)
Create a schedule for an existing
TaskDefinition name. |
void |
unschedule(String scheduleName,
String platform)
Unschedule the schedule from the Scheduler.
|
public TaskSchedulerController(SchedulerService schedulerService)
TaskSchedulerController
that delegates
SchedulerService
schedulerService
- the scheduler service to use to delegate task
scheduler operations.@RequestMapping(value="", method=GET) @ResponseStatus(value=OK) public org.springframework.hateoas.PagedModel<ScheduleInfoResource> list(org.springframework.data.domain.Pageable pageable, @RequestParam(value="platform",required=false) String platform, org.springframework.data.web.PagedResourcesAssembler<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> assembler)
ScheduleInfo
s.assembler
- assembler for the ScheduleInfo
platform
- the name of the platform from which schedules will be retrieved.pageable
- Pageable
to be used@RequestMapping(value="/{name}", method=GET) @ResponseStatus(value=OK) public ScheduleInfoResource getSchedule(@PathVariable(value="name") String scheduleName, @RequestParam(value="platform",required=false) String platform)
ScheduleInfo
for a specific Schedule.scheduleName
- assembler for the ScheduleInfo
platform
- the name of the platform from which the schedule will be retrieved.ScheduleInfoResource
instance for the scheduleName specified.@RequestMapping(value="/instances/{taskDefinitionName}") public org.springframework.hateoas.PagedModel<ScheduleInfoResource> filteredList(@PathVariable String taskDefinitionName, @RequestParam(value="platform",required=false) String platform, org.springframework.data.web.PagedResourcesAssembler<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> assembler)
ScheduleInfo
s for a specific
TaskDefinition
name.taskDefinitionName
- name of the taskDefinition to search.platform
- name of the platform from which the list is retrieved.assembler
- assembler for the ScheduleInfo
.@RequestMapping(value="/instances/{taskDefinitionName}", method=DELETE) @ResponseStatus(value=OK) public void deleteSchedulesforDefinition(@PathVariable String taskDefinitionName)
TaskDefinition
name .taskDefinitionName
- the name of the TaskDefinition
.@RequestMapping(value="", method=POST) @ResponseStatus(value=CREATED) public void save(@RequestParam(value="scheduleName") String scheduleName, @RequestParam(value="taskDefinitionName") String taskDefinitionName, @RequestParam String properties, @RequestParam(required=false) String arguments, @RequestParam(value="platform",required=false) String platform)
TaskDefinition
name.scheduleName
- the name of the schedule being created.taskDefinitionName
- the name of the existing task to be executed (required)properties
- the runtime properties for the task, as a comma-delimited list of
key=value pairsarguments
- the runtime commandline argumentsplatform
- the name of the platform for which the schedule is created.@RequestMapping(value="/{scheduleName}", method=DELETE) @ResponseStatus(value=OK) public void unschedule(@PathVariable(value="scheduleName") String scheduleName, @RequestParam(value="platform",required=false) String platform)
scheduleName
- name of the schedule to be deletedplatform
- name of the platform from which the schedule is deleted.Copyright © 2024 Pivotal Software, Inc.. All rights reserved.