Interface ScheduleClient


public interface ScheduleClient
Client to the Temporal service used to create, list and get handles to Schedules.
See Also:
  • Method Details

    • newInstance

      static ScheduleClient newInstance(io.temporal.serviceclient.WorkflowServiceStubs service)
      Creates a client that connects to an instance of the Temporal Service to interact with schedules.
      Parameters:
      service - client to the Temporal Service endpoint.
      Returns:
      client to interact with schedules
    • newInstance

      static ScheduleClient newInstance(io.temporal.serviceclient.WorkflowServiceStubs service, ScheduleClientOptions options)
      Creates a client that connects to an instance of the Temporal Service to interact with schedules.
      Parameters:
      service - client to the Temporal Service endpoint.
      options - Options (like DataConverterer override) for configuring client.
      Returns:
      client to interact with schedules
    • createSchedule

      ScheduleHandle createSchedule(String scheduleID, Schedule schedule, ScheduleOptions options)
      Create a schedule and return its handle.
      Parameters:
      scheduleID - Unique ID for the schedule.
      schedule - Schedule to create.
      options - Options for creating the schedule.
      Returns:
      A handle that can be used to perform operations on a schedule.
      Throws:
      ScheduleAlreadyRunningException - if the schedule is already runnning.
    • getHandle

      ScheduleHandle getHandle(String scheduleID)
      Gets the schedule handle for the given ID.
      Parameters:
      scheduleID - Schedule ID to get the handle for.
      Returns:
      A handle that can be used to perform operations on a schedule.
    • listSchedules

      List schedules.
      Returns:
      sequential stream that performs remote pagination under the hood
    • listSchedules

      Stream<ScheduleListDescription> listSchedules(@Nullable Integer pageSize)
      List schedules.
      Parameters:
      pageSize - how many results to fetch from the Server at a time. Default is 100.
      Returns:
      sequential stream that performs remote pagination under the hood
    • listSchedules

      Stream<ScheduleListDescription> listSchedules(@Nullable String query, @Nullable Integer pageSize)
      List schedules.
      Parameters:
      query - Temporal Visibility Query, for syntax see Visibility docs
      pageSize - how many results to fetch from the Server at a time. Default is 100.
      Returns:
      sequential stream that performs remote pagination under the hood