Scheduler functionality
1. You may redefine entire schedulers, if you so choose. To do so, override
the 3 methods that return Scheduler (io(), computation(), newThread()).
2. You may wrap/decorate an Action0, before it is handed off to a Scheduler. The system-
supplied Schedulers (Schedulers.ioScheduler, Schedulers.computationScheduler,
Scheduler.newThreadScheduler) all use this hook, so it's a convenient way to
modify Scheduler functionality without redefining Schedulers wholesale.
Also, when redefining Schedulers, you are free to use/not use the onSchedule decoration hook.
See RxJavaPlugins or the RxJava GitHub Wiki for information on configuring plugins:
https://github.com/ReactiveX/RxJava/wiki/Plugins.
| Modifier and Type | Field and Description |
|---|---|
| private static final RxJavaSchedulersHook |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Scheduler | Returns: the created Scheduler instanceCreate an instance of the default |
| public static Scheduler | Returns: the created Scheduler instancethe factory to use for each worker thread threadFactory)Create an instance of the default |
| public static Scheduler | Returns: the created Scheduler instanceCreate an instance of the default |
| public static Scheduler | Returns: the created Scheduler instancethe factory to use for each worker thread threadFactory)Create an instance of the default |
| public static Scheduler | Returns: the created Scheduler instanceCreate an instance of the default |
| public static Scheduler | Returns: the created Scheduler instancethe factory to use for each worker thread threadFactory)Create an instance of the default |
| public Scheduler | Returns: the current computation scheduler instanceScheduler to return from |
| public static RxJavaSchedulersHook | |
| public Scheduler | Returns: the created Scheduler instanceScheduler to return from |
| public Scheduler | Returns: the current new thread scheduler instanceScheduler to return from |
| public Action0 | Returns: wrapped action to scheduleaction to schedule action)
Deprecated
Invoked before the Action is handed over to the scheduler.
|
| DEFAULT_INSTANCE | back to summary |
|---|---|
| private static final RxJavaSchedulersHook DEFAULT_INSTANCE | |
| RxJavaSchedulersHook | back to summary |
|---|---|
| public RxJavaSchedulersHook() | |
| createComputationScheduler | back to summary |
|---|---|
| public static Scheduler createComputationScheduler() Create an instance of the default
| |
| createComputationScheduler | back to summary |
|---|---|
| public static Scheduler createComputationScheduler(ThreadFactory threadFactory) Create an instance of the default
| |
| createIoScheduler | back to summary |
|---|---|
| public static Scheduler createIoScheduler() Create an instance of the default
| |
| createIoScheduler | back to summary |
|---|---|
| public static Scheduler createIoScheduler(ThreadFactory threadFactory) Create an instance of the default
| |
| createNewThreadScheduler | back to summary |
|---|---|
| public static Scheduler createNewThreadScheduler() Create an instance of the default
| |
| createNewThreadScheduler | back to summary |
|---|---|
| public static Scheduler createNewThreadScheduler(ThreadFactory threadFactory) Create an instance of the default
| |
| getComputationScheduler | back to summary |
|---|---|
| public Scheduler getComputationScheduler() Scheduler to return from
| |
| getDefaultInstance | back to summary |
|---|---|
| public static RxJavaSchedulersHook getDefaultInstance() | |
| getIOScheduler | back to summary |
|---|---|
| public Scheduler getIOScheduler() Scheduler to return from
| |
| getNewThreadScheduler | back to summary |
|---|---|
| public Scheduler getNewThreadScheduler() Scheduler to return from
| |
| onSchedule | back to summary |
|---|---|
| public Action0 onSchedule(Action0 action)
Deprecated
Invoked before the Action is handed over to the scheduler. Can be used for wrapping/decorating/logging. The default is just a pass through. | |