| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final AtomicReference | |
| private static final String | KEY_SINGLE_PRIORITY
The name of the system property for setting the thread priority for this Scheduler. |
| pack-priv static final ScheduledExecutorService | |
| pack-priv static final RxThreadFactory | |
| private static final String | |
| pack-priv final ThreadFactory |
| Access | Constructor and Description |
|---|---|
| public | |
| public | SingleScheduler(ThreadFactory
thread factory to use for creating worker threads. Note that this takes precedence over any
system properties for configuring new thread creation. Cannot be null. threadFactory)Constructs a SingleScheduler with the given ThreadFactory and prepares the single scheduler thread. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static ScheduledExecutorService | |
| public @NonNull Scheduler. | createWorker()
Implements abstract io. Scheduler. that represents sequential execution of actions.
|
| public @NonNull Disposable | |
| public @NonNull Disposable | |
| public void | shutdown()
Overrides io. Worker instances
and clean up any associated resources with this Scheduler.
|
| public void | start()
Overrides io. |
| executor | back to summary |
|---|---|
| pack-priv final AtomicReference<ScheduledExecutorService> executor | |
| KEY_SINGLE_PRIORITY | back to summary |
|---|---|
| private static final String KEY_SINGLE_PRIORITY The name of the system property for setting the thread priority for this Scheduler. | |
| SHUTDOWN | back to summary |
|---|---|
| pack-priv static final ScheduledExecutorService SHUTDOWN | |
| SINGLE_THREAD_FACTORY | back to summary |
|---|---|
| pack-priv static final RxThreadFactory SINGLE_THREAD_FACTORY | |
| THREAD_NAME_PREFIX | back to summary |
|---|---|
| private static final String THREAD_NAME_PREFIX | |
| threadFactory | back to summary |
|---|---|
| pack-priv final ThreadFactory threadFactory | |
| SingleScheduler | back to summary |
|---|---|
| public SingleScheduler() | |
| SingleScheduler | back to summary |
|---|---|
| public SingleScheduler(ThreadFactory threadFactory) Constructs a SingleScheduler with the given ThreadFactory and prepares the single scheduler thread.
| |
| createExecutor | back to summary |
|---|---|
| pack-priv static ScheduledExecutorService createExecutor(ThreadFactory threadFactory) | |
| 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, long delay, TimeUnit unit) | |
| schedulePeriodicallyDirect | back to summary |
|---|---|
| public @NonNull Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, TimeUnit unit) | |
| shutdown | back to summary |
|---|---|
| public void shutdown() Overrides io. Doc from io. Instructs the Scheduler instance to stop threads,
stop accepting tasks on any outstanding
Implementations should make sure the call is idempotent, thread-safe and
should not throw any
| |
| start | back to summary |
|---|---|
| public void start() Overrides io. Doc from io. Allows the Scheduler instance to start threads and accept tasks on them.
Implementations should make sure the call is idempotent, thread-safe and
should not throw any
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile boolean | |
| pack-priv final ScheduledExecutorService | |
| pack-priv final CompositeDisposable |
| 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 |
| disposed | back to summary |
|---|---|
| pack-priv volatile boolean disposed | |
| executor | back to summary |
|---|---|
| pack-priv final ScheduledExecutorService executor | |
| tasks | back to summary |
|---|---|
| pack-priv final CompositeDisposable tasks | |
| ScheduledWorker | back to summary |
|---|---|
| pack-priv ScheduledWorker(ScheduledExecutorService executor) | |
| 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, long delay, @NonNull TimeUnit unit) | |