Note that this doesn't support recursive scheduling and disposing the returned Disposable has no effect (because when the schedule() method returns, the task has been already run).
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final Disposable | |
| public static final Scheduler | INSTANCE
The singleton instance of the immediate (thin) scheduler. |
| pack-priv static final Scheduler. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public @NonNull Scheduler. | createWorker()
Implements abstract io. Scheduler. that represents sequential execution of actions.
|
| public @NonNull Disposable | |
| public @NonNull Disposable | |
| public @NonNull Disposable |
| DISPOSED | back to summary |
|---|---|
| pack-priv static final Disposable DISPOSED | |
| INSTANCE | back to summary |
|---|---|
| public static final Scheduler INSTANCE The singleton instance of the immediate (thin) scheduler. | |
| WORKER | back to summary |
|---|---|
| pack-priv static final Scheduler. | |
| ImmediateThinScheduler | back to summary |
|---|---|
| private ImmediateThinScheduler() | |
| createWorker | back to summary |
|---|---|
| public @NonNull Scheduler. Implements abstract io. Doc from io. Retrieves or creates a new
When work is completed, the
Work on a | |
| scheduleDirect | back to summary |
|---|---|
| public @NonNull Disposable scheduleDirect(@NonNull Runnable run) | |
| scheduleDirect | back to summary |
|---|---|
| public @NonNull Disposable scheduleDirect(@NonNull Runnable run, long delay, TimeUnit unit) | |
| schedulePeriodicallyDirect | back to summary |
|---|---|
| public @NonNull Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, TimeUnit unit) | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements io. |
| public boolean | isDisposed()
Implements io. |
| public @NonNull Disposable | |
| public @NonNull Disposable | |
| public @NonNull Disposable |
| ImmediateThinWorker | back to summary |
|---|---|
| pack-priv ImmediateThinWorker() | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements io. Doc from io. Dispose the resource, the operation should be idempotent.
| |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Implements io. Doc from io. Returns true if this resource has been disposed.
| |
| schedule | back to summary |
|---|---|
| public @NonNull Disposable schedule(@NonNull Runnable run) | |
| schedule | back to summary |
|---|---|
| public @NonNull Disposable schedule(@NonNull Runnable run, long delay, @NonNull TimeUnit unit) | |
| schedulePeriodically | back to summary |
|---|---|
| public @NonNull Disposable schedulePeriodically(@NonNull Runnable run, long initialDelay, long period, TimeUnit unit) | |