Class RecurringEventScheduler

java.lang.Object
com.iantapply.orchestra.schedule.RecurringEventScheduler
All Implemented Interfaces:
AutoCloseable

public final class RecurringEventScheduler extends Object implements AutoCloseable
Polls recurring definitions and uses distributed leases to emit each minute-level occurrence at most once across concurrently running nodes.
  • 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 schedules
      engine - engine receiving scheduled executions
      locks - lease provider used to deduplicate occurrences
      clock - 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:
      close in interface AutoCloseable