Package 

Class EventLoopsScheduler

    • Constructor Summary

      Constructors 
      Constructor Description
      EventLoopsScheduler(ThreadFactory threadFactory) Create a scheduler with pool size equal to the available processorcount and using least-recent worker selection policy.
    • Method Summary

      Modifier and Type Method Description
      Scheduler.Worker createWorker() Retrieves or creates a new Scheduler.Worker that represents serial execution of actions.
      void start() Allows the Scheduler instance to start threadsand accept tasks on them.
      void shutdown() Instructs the Scheduler instance to stop threadsand stop accepting tasks on any outstanding Workers.
      Subscription scheduleDirect(Action0 action) Schedules the action directly on one of the event loop workerswithout the additional infrastructure and checking.
      • Methods inherited from class com.tds.common.reactor.schedulers.Scheduler

        now
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EventLoopsScheduler

        EventLoopsScheduler(ThreadFactory threadFactory)
        Create a scheduler with pool size equal to the available processorcount and using least-recent worker selection policy.
        Parameters:
        threadFactory - the factory to use with the executors
    • Method Detail

      • start

         void start()

        Allows the Scheduler instance to start threadsand accept tasks on them.

        Implementations should make sure the call is idempotent and thread-safe.

      • shutdown

         void shutdown()

        Instructs the Scheduler instance to stop threadsand stop accepting tasks on any outstanding Workers.

        Implementations should make sure the call is idempotent and thread-safe.

      • scheduleDirect

         Subscription scheduleDirect(Action0 action)

        Schedules the action directly on one of the event loop workerswithout the additional infrastructure and checking.

        Parameters:
        action - the action to schedule