Class SharedScheduler


  • public final class SharedScheduler
    extends Scheduler
    A Scheduler implementation that uses one of the Workers from another Scheduler and shares the access to it through its own Workers.

    Disposing a worker doesn't dispose the underlying shared worker so other workers of this class can continue their work; use shutdown() to release the underlying shared worker.

    This scheduler doesn't support Scheduler.start() (it's a no-op) and once shutdown() it can't be revived.

    Since:
    0.6.2
    • Constructor Detail

      • SharedScheduler

        public SharedScheduler​(Scheduler other)
        Constructs a SharedScheduler and asks for a Worker from the provided other Scheduler.
        Parameters:
        other - the other Scheduler instance, not null
      • SharedScheduler

        public SharedScheduler​(Scheduler.Worker worker)
        Constructs a SharedScheduler and uses the Worker instance provided.
        Parameters:
        worker - the worker to use, not null