| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | |
| pack-priv static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Executor | |
| pack-priv static final Scheduler | |
| pack-priv final boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Scheduler. | createWorker()
Implements abstract io. Scheduler. that represents sequential execution of actions.
|
| public Disposable | scheduleDirect(Runnable
the task to execute run)Overrides io. |
| public Disposable | scheduleDirect(Runnable
the task to schedule run, final long the delay amount, non-positive values indicate non-delayed scheduling delay, final TimeUnit the unit of measure of the delay amount unit)Overrides io. |
| public Disposable | schedulePeriodicallyDirect(Runnable
the task to schedule run, long the initial delay amount, non-positive values indicate non-delayed scheduling initialDelay, long the period at which the task should be re-executed period, TimeUnit the unit of measure of the delay amount unit)Overrides io. |
| executor | back to summary |
|---|---|
| pack-priv final Executor executor
| |
| HELPER | back to summary |
|---|---|
| pack-priv static final Scheduler HELPER | |
| interruptibleWorker | back to summary |
|---|---|
| pack-priv final boolean interruptibleWorker | |
| ExecutorScheduler | back to summary |
|---|---|
| public ExecutorScheduler(Executor executor, boolean interruptibleWorker) | |
| createWorker | back to summary |
|---|---|
| public 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 Disposable scheduleDirect(Runnable run) Overrides io. Doc from io. Schedules the given task on this Scheduler without any time delay. This method is safe to be called from multiple threads but there are no ordering or non-overlapping guarantees between tasks.
| |
| scheduleDirect | back to summary |
|---|---|
| public Disposable scheduleDirect(Runnable run, final long delay, final TimeUnit unit) Overrides io. Doc from io. Schedules the execution of the given task with the given time delay. This method is safe to be called from multiple threads but there are no ordering guarantees between tasks.
| |
| schedulePeriodicallyDirect | back to summary |
|---|---|
| public Disposable schedulePeriodicallyDirect(Runnable run, long initialDelay, long period, TimeUnit unit) Overrides io. Doc from io. Schedules a periodic execution of the given task with the given initial time delay and repeat period. This method is safe to be called from multiple threads but there are no ordering guarantees between tasks.
The periodic execution is at a fixed rate, that is, the first execution will be after the
| |
| Modifier and Type | Field and Description |
|---|---|
| private final ExecutorScheduler. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| dr | back to summary |
|---|---|
| private final ExecutorScheduler. | |
| DelayedDispose | back to summary |
|---|---|
| pack-priv DelayedDispose(ExecutorScheduler. | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final SequentialDisposable | |
| private static final long | |
| pack-priv final SequentialDisposable |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements io. |
| public Runnable | getWrappedRunnable()
Implements io. |
| public boolean | isDisposed()
Implements io. |
| public void |
| direct | back to summary |
|---|---|
| pack-priv final SequentialDisposable direct | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| timed | back to summary |
|---|---|
| pack-priv final SequentialDisposable timed | |
| DelayedRunnable | back to summary |
|---|---|
| pack-priv DelayedRunnable(Runnable run) | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements io. Doc from io. Dispose the resource, the operation should be idempotent.
| |
| getWrappedRunnable | back to summary |
|---|---|
| public Runnable getWrappedRunnable() Implements io. Doc from io. Returns the wrapped action. | |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Implements io. Doc from io. Returns true if this resource has been disposed.
| |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | ExecutorScheduler.ExecutorWorker.InterruptibleRunnable
Wrapper for a |
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile boolean | |
| pack-priv final Executor | |
| pack-priv final boolean | |
| pack-priv final MpscLinkedQueue | |
| pack-priv final CompositeDisposable | |
| pack-priv final AtomicInteger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements io. |
| public boolean | isDisposed()
Implements io. |
| public void | |
| public Disposable | schedule(Runnable
Runnable to schedule run)Overrides io. |
| public Disposable | schedule(Runnable
the Runnable to schedule run, long time to "wait" before executing the action; non-positive values indicate an non-delayed
schedule delay, TimeUnit the time unit of unit)delayTimeImplements abstract io. |
| disposed | back to summary |
|---|---|
| pack-priv volatile boolean disposed | |
| executor | back to summary |
|---|---|
| pack-priv final Executor executor | |
| interruptibleWorker | back to summary |
|---|---|
| pack-priv final boolean interruptibleWorker | |
| queue | back to summary |
|---|---|
| pack-priv final MpscLinkedQueue<Runnable> queue | |
| tasks | back to summary |
|---|---|
| pack-priv final CompositeDisposable tasks | |
| wip | back to summary |
|---|---|
| pack-priv final AtomicInteger wip | |
| ExecutorWorker | back to summary |
|---|---|
| public ExecutorWorker(Executor executor, boolean interruptibleWorker) | |
| 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.
| |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| schedule | back to summary |
|---|---|
| public Disposable schedule(Runnable run) Overrides io. Doc from io. Schedules a Runnable for execution without any time delay. The default implementation delegates to
| |
| schedule | back to summary |
|---|---|
| public Disposable schedule(Runnable run, long delay, TimeUnit unit) Implements abstract io. Doc from io. Schedules an Runnable for execution at some point in the future specified by a time delay relative to the current time.
Note to implementors: non-positive
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Runnable | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements io. |
| public boolean | isDisposed()
Implements io. |
| public void |
| actual | back to summary |
|---|---|
| pack-priv final Runnable actual | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| BooleanRunnable | back to summary |
|---|---|
| pack-priv BooleanRunnable(Runnable actual) | |
| 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.
| |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
Runnable with additional logic for handling interruption on
a shared thread, similar to how Java Executors do it.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv final Runnable | |
| pack-priv static final int | |
| private static final long | |
| pack-priv final DisposableContainer | |
| pack-priv volatile Thread |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public void | dispose()
Implements io. |
| public boolean | isDisposed()
Implements io. |
| public void |
| FINISHED | back to summary |
|---|---|
| pack-priv static final int FINISHED | |
| INTERRUPTED | back to summary |
|---|---|
| pack-priv static final int INTERRUPTED | |
| INTERRUPTING | back to summary |
|---|---|
| pack-priv static final int INTERRUPTING | |
| READY | back to summary |
|---|---|
| pack-priv static final int READY | |
| run | back to summary |
|---|---|
| pack-priv final Runnable run | |
| RUNNING | back to summary |
|---|---|
| pack-priv static final int RUNNING | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| tasks | back to summary |
|---|---|
| pack-priv final DisposableContainer tasks | |
| thread | back to summary |
|---|---|
| pack-priv volatile Thread thread | |
| InterruptibleRunnable | back to summary |
|---|---|
| pack-priv InterruptibleRunnable(Runnable run, DisposableContainer tasks) | |
| cleanup | back to summary |
|---|---|
| pack-priv void cleanup() | |
| 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.
| |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Runnable | |
| private final SequentialDisposable |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| decoratedRun | back to summary |
|---|---|
| private final Runnable decoratedRun | |
| mar | back to summary |
|---|---|
| private final SequentialDisposable mar | |
| SequentialDispose | back to summary |
|---|---|
| pack-priv SequentialDispose(SequentialDisposable mar, Runnable decoratedRun) | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |