Class RecurringEventScheduler
java.lang.Object
com.iantapply.orchestra.schedule.RecurringEventScheduler
- All Implemented Interfaces:
AutoCloseable
Polls recurring definitions and uses distributed leases to emit each minute-level
occurrence at most once across concurrently running nodes.
-
Constructor Summary
ConstructorsConstructorDescriptionRecurringEventScheduler(DefinitionRepository definitions, OrchestratorEngine engine, DistributedLock locks, Clock clock) Creates a distributed recurring-event dispatcher. -
Method Summary
-
Constructor Details
-
RecurringEventScheduler
public RecurringEventScheduler(DefinitionRepository definitions, OrchestratorEngine engine, DistributedLock locks, Clock clock) Creates a distributed recurring-event dispatcher.- Parameters:
definitions- definitions containing optional recurring schedulesengine- engine receiving scheduled executionslocks- lease provider used to deduplicate occurrencesclock- scheduler clock
-
-
Method Details
-
start
public void start()Starts the recurring schedule poller once. -
close
public void close()Stops future recurring schedule checks.- Specified by:
closein interfaceAutoCloseable
-