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é
-
-
Constructor Summary
Constructors Constructor Description CoreScheduler(int poolSize)
Create a scheduler with specified pool size and using least-recent worker selection policy.
-
Method Summary
All Methods Instance Methods Concrete Methods 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()
-
-
-
Method Detail
-
start
public void start()
-
shutdown
public rx.Observable<Boolean> 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
-
-