public interface ScheduleSourceFactory
ScheduleSource. A schedule source is responsible for making
read-only access to a set of Workflows available to styx from another data source.
When ScheduleSource.start() is called, changeListener gets called for each available Workflow.
After the initial bootstrap, making all data available, changeListener gets called for updated
or added Workflows, and removeListener gets called whenever a Workflow is removed.
This interface is intended to be used as an Service Provider Interface. Styx will discover
implementations on the classpath using ServiceLoader.
| Modifier and Type | Method and Description |
|---|---|
ScheduleSource |
create(Consumer<Workflow> changeListener,
Consumer<Workflow> removeListener,
com.spotify.apollo.Environment environment,
ScheduledExecutorService exec)
Crate a new
ScheduleSource. |
ScheduleSource create(Consumer<Workflow> changeListener, Consumer<Workflow> removeListener, com.spotify.apollo.Environment environment, ScheduledExecutorService exec)
ScheduleSource.changeListener - A callback that will be invoked whenever a workflow in created/changed.
On startup, changeListener gets called for all available workflows to
bootstrap the system.removeListener - A callback that will be invoked whenever a workflow is removedenvironment - An Apollo environment that might be usedexec - An executor that might be usedCopyright © 2017. All rights reserved.