Interface ScheduleClient
public interface ScheduleClient
Client to the Temporal service used to create, list and get handles to Schedules.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateSchedule(String scheduleID, Schedule schedule, ScheduleOptions options) Create a schedule and return its handle.Gets the schedule handle for the given ID.List schedules.listSchedules(Integer pageSize) List schedules.listSchedules(String query, Integer pageSize) List schedules.static ScheduleClientnewInstance(io.temporal.serviceclient.WorkflowServiceStubs service) Creates a client that connects to an instance of the Temporal Service to interact with schedules.static ScheduleClientnewInstance(io.temporal.serviceclient.WorkflowServiceStubs service, ScheduleClientOptions options) Creates a client that connects to an instance of the Temporal Service to interact with schedules.
-
Method Details
-
newInstance
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 (likeDataConverterer override) for configuring client.- Returns:
- client to interact with schedules
-
createSchedule
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
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
Stream<ScheduleListDescription> listSchedules()List schedules.- Returns:
- sequential stream that performs remote pagination under the hood
-
listSchedules
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
List schedules.- Parameters:
query- Temporal Visibility Query, for syntax see Visibility docspageSize- how many results to fetch from the Server at a time. Default is 100.- Returns:
- sequential stream that performs remote pagination under the hood
-