org.springframework.cloud.dataflow.rest.client.dsl.task

## Class TaskScheduleBuilder

- java.lang.Object
- - org.springframework.cloud.dataflow.rest.client.dsl.task.TaskScheduleBuilder

-     public class TaskScheduleBuilder
      extends Object

  Author:
    Christian Tzolov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaskScheduleBuilder(DataFlowOperations dataFlowOperations)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TaskSchedule` | `build()` Create new `TaskSchedule` instance based on the scheduler name and task.
    `Optional<TaskSchedule>` | `findByScheduleName(String scheduleName)` Retrieves an existing `TaskSchedule` by name.
    `List<TaskSchedule>` | `list()`
    `List<TaskSchedule>` | `list(Task task)` Retrieve all schedules registered for a given Task.
    `TaskScheduleBuilder` | `scheduleName(String name)`
    `TaskScheduleBuilder` | `task(Task task)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TaskScheduleBuilder

          public TaskScheduleBuilder(DataFlowOperations dataFlowOperations)

  - ### Method Detail

    - #### scheduleName

          public TaskScheduleBuilder scheduleName(String name)

    - #### task

          public TaskScheduleBuilder task(Task task)

    - #### build

          public TaskSchedule build()

      Create new `TaskSchedule` instance based on the scheduler name and task.
      Returns:
        Returns new `TaskSchedule` instance.

    - #### findByScheduleName

          public Optional<TaskSchedule> findByScheduleName(String scheduleName)

      Retrieves an existing `TaskSchedule` by name.
      Parameters:
        `scheduleName` - schedule name to search for.
      Returns:
        Returns an existing `TaskSchedule` by name.

    - #### list

          public List<TaskSchedule> list(Task task)

      Retrieve all schedules registered for a given Task.
      Parameters:
        `task` - Task to search scheduled for.
      Returns:
        Returns list of all schedules for the provided task.

    - #### list

          public List<TaskSchedule> list()

      Returns:
        Returns all registered task schedules.

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.