Class CoreScheduler

java.lang.Object
rx.Scheduler
com.couchbase.client.core.env.CoreScheduler
All Implemented Interfaces:
ShutdownHook

public class CoreScheduler
extends rx.Scheduler
implements ShutdownHook
The Core scheduler which is modeled after the Event Loops Scheduler (which is package private).
Author:
Michael Nitschinger, Simon Baslé
  • Nested Class Summary

    Nested classes/interfaces inherited from class rx.Scheduler

    rx.Scheduler.Worker
  • Constructor Summary

    Constructors
    Constructor Description
    CoreScheduler​(int poolSize)
    Create a scheduler with specified pool size and using least-recent worker selection policy.
  • Method Summary

    Modifier and Type Method Description
    rx.Scheduler.Worker createWorker()  
    boolean isShutdown()  
    rx.Subscription scheduleDirect​(rx.functions.Action0 action)
    Schedules the action directly on one of the event loop workers without the additional infrastructure and checking.
    rx.Observable<Boolean> shutdown()  
    void start()  

    Methods inherited from class rx.Scheduler

    now, when

    Methods inherited from class java.lang.Object

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

    • CoreScheduler

      public CoreScheduler​(int poolSize)
      Create a scheduler with specified pool size and using least-recent worker selection policy.
  • Method Details

    • start

      public void start()
    • shutdown

      public rx.Observable<Boolean> shutdown()
      Specified by:
      shutdown in interface ShutdownHook
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface ShutdownHook
    • createWorker

      public rx.Scheduler.Worker createWorker()
      Specified by:
      createWorker in class rx.Scheduler
    • scheduleDirect

      public rx.Subscription scheduleDirect​(rx.functions.Action0 action)
      Schedules the action directly on one of the event loop workers without the additional infrastructure and checking.
      Parameters:
      action - the action to schedule
      Returns:
      the subscription