@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,
org.springframework.data.web.PagedResourcesAssembler<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> assembler)
Return a page-able list of
ScheduleInfos for a specific
TaskDefinition name. |
ScheduleInfoResource |
getSchedule(String scheduleName)
Return a
ScheduleInfo for a specific Schedule. |
org.springframework.hateoas.PagedModel<ScheduleInfoResource> |
list(org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> assembler)
Return a page-able list of
ScheduleInfos. |
void |
save(String scheduleName,
String taskDefinitionName,
String properties,
String arguments)
Create a schedule for an existing
TaskDefinition name. |
void |
unschedule(String scheduleName)
Unschedule the schedule from the Scheduler.
|
public TaskSchedulerController(SchedulerService schedulerService)
TaskSchedulerController that delegates
SchedulerServiceschedulerService - 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,
org.springframework.data.web.PagedResourcesAssembler<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> assembler)
ScheduleInfos.assembler - assembler for the ScheduleInfopageable - Pageable to be used@RequestMapping(value="/{name}",
method=GET)
@ResponseStatus(value=OK)
public ScheduleInfoResource getSchedule(@PathVariable(value="name")
String scheduleName)
ScheduleInfo for a specific Schedule.scheduleName - assembler for the ScheduleInfoScheduleInfoResource instance for the scheduleName specified.@RequestMapping(value="/instances/{taskDefinitionName}")
public org.springframework.hateoas.PagedModel<ScheduleInfoResource> filteredList(@PathVariable
String taskDefinitionName,
org.springframework.data.web.PagedResourcesAssembler<org.springframework.cloud.deployer.spi.scheduler.ScheduleInfo> assembler)
ScheduleInfos for a specific
TaskDefinition name.taskDefinitionName - name of the taskDefinition to search.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)
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 arguments@RequestMapping(value="/{scheduleName}",
method=DELETE)
@ResponseStatus(value=OK)
public void unschedule(@PathVariable(value="scheduleName")
String scheduleName)
scheduleName - name of the schedule to be deletedCopyright © 2020 Pivotal Software, Inc.. All rights reserved.