Package com.couchbase.client.core.env
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
-
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
- Specified by:
shutdown
in interfaceShutdownHook
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdown
in interfaceShutdownHook
-
createWorker
public rx.Scheduler.Worker createWorker()- Specified by:
createWorker
in classrx.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
-