| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final RxThreadFactory | |
| private static final String | |
| private static final long | |
| public static final long | |
| private static final TimeUnit | |
| private static final String | KEY_IO_PRIORITY
The name of the system property for setting the thread priority for this Scheduler. |
| private static final String | KEY_KEEP_ALIVE_TIME
The name of the system property for setting the keep-alive time (in seconds) for this Scheduler workers. |
| private static final String | KEY_SCHEDULED_RELEASE
The name of the system property for setting the release behaviour for this Scheduler. |
| pack-priv static final IoScheduler. | |
| pack-priv final AtomicReference | |
| pack-priv static final IoScheduler. | |
| pack-priv final ThreadFactory | |
| pack-priv static boolean | |
| pack-priv static final RxThreadFactory | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | IoScheduler(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 an IoScheduler with the given thread factory and starts the pool of workers. |
| Modifier and Type | Method and Description |
|---|---|
| public @NonNull Scheduler. | createWorker()
Implements abstract io. Scheduler. that represents sequential execution of actions.
|
| public void | shutdown()
Overrides io. Worker instances
and clean up any associated resources with this Scheduler.
|
| public int | |
| public void | start()
Overrides io. |
| EVICTOR_THREAD_FACTORY | back to summary |
|---|---|
| pack-priv static final RxThreadFactory EVICTOR_THREAD_FACTORY | |
| EVICTOR_THREAD_NAME_PREFIX | back to summary |
|---|---|
| private static final String EVICTOR_THREAD_NAME_PREFIX | |
| KEEP_ALIVE_TIME | back to summary |
|---|---|
| private static final long KEEP_ALIVE_TIME | |
| KEEP_ALIVE_TIME_DEFAULT | back to summary |
|---|---|
| public static final long KEEP_ALIVE_TIME_DEFAULT | |
| KEEP_ALIVE_UNIT | back to summary |
|---|---|
| private static final TimeUnit KEEP_ALIVE_UNIT | |
| KEY_IO_PRIORITY | back to summary |
|---|---|
| private static final String KEY_IO_PRIORITY The name of the system property for setting the thread priority for this Scheduler. | |
| KEY_KEEP_ALIVE_TIME | back to summary |
|---|---|
| private static final String KEY_KEEP_ALIVE_TIME The name of the system property for setting the keep-alive time (in seconds) for this Scheduler workers. | |
| KEY_SCHEDULED_RELEASE | back to summary |
|---|---|
| private static final String KEY_SCHEDULED_RELEASE The name of the system property for setting the release behaviour for this Scheduler. | |
| NONE | back to summary |
|---|---|
| pack-priv static final IoScheduler. | |
| pool | back to summary |
|---|---|
| pack-priv final AtomicReference<IoScheduler. | |
| SHUTDOWN_THREAD_WORKER | back to summary |
|---|---|
| pack-priv static final IoScheduler. | |
| threadFactory | back to summary |
|---|---|
| pack-priv final ThreadFactory threadFactory | |
| USE_SCHEDULED_RELEASE | back to summary |
|---|---|
| pack-priv static boolean USE_SCHEDULED_RELEASE | |
| WORKER_THREAD_FACTORY | back to summary |
|---|---|
| pack-priv static final RxThreadFactory WORKER_THREAD_FACTORY | |
| WORKER_THREAD_NAME_PREFIX | back to summary |
|---|---|
| private static final String WORKER_THREAD_NAME_PREFIX | |
| IoScheduler | back to summary |
|---|---|
| public IoScheduler() | |
| IoScheduler | back to summary |
|---|---|
| public IoScheduler(ThreadFactory threadFactory) Constructs an IoScheduler with the given thread factory and starts the pool of workers.
| |
| 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 | |
| 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
| |
| size | back to summary |
|---|---|
| public int size() | |
| 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 final CompositeDisposable | |
| private final ScheduledExecutorService | |
| private final Future | |
| private final ConcurrentLinkedQueue | |
| private final long | |
| private final ThreadFactory |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static void | evictExpiredWorkers(ConcurrentLinkedQueue<IoScheduler.
|
| pack-priv IoScheduler. | |
| pack-priv static long | |
| pack-priv void | |
| public void | |
| pack-priv void |
| allWorkers | back to summary |
|---|---|
| pack-priv final CompositeDisposable allWorkers | |
| evictorService | back to summary |
|---|---|
| private final ScheduledExecutorService evictorService | |
| evictorTask | back to summary |
|---|---|
| private final Future<?> evictorTask | |
| expiringWorkerQueue | back to summary |
|---|---|
| private final ConcurrentLinkedQueue<IoScheduler. | |
| keepAliveTime | back to summary |
|---|---|
| private final long keepAliveTime | |
| threadFactory | back to summary |
|---|---|
| private final ThreadFactory threadFactory | |
| CachedWorkerPool | back to summary |
|---|---|
| pack-priv CachedWorkerPool(long keepAliveTime, TimeUnit unit, ThreadFactory threadFactory) | |
| evictExpiredWorkers | back to summary |
|---|---|
| pack-priv static void evictExpiredWorkers(ConcurrentLinkedQueue<IoScheduler. | |
| get | back to summary |
|---|---|
| pack-priv IoScheduler. | |
| now | back to summary |
|---|---|
| pack-priv static long now() | |
| release | back to summary |
|---|---|
| pack-priv void release(IoScheduler. | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| shutdown | back to summary |
|---|---|
| pack-priv void shutdown() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final AtomicBoolean | |
| private final IoScheduler. | |
| private final CompositeDisposable | |
| private final IoScheduler. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements io. |
| public boolean | isDisposed()
Implements io. |
| public void | |
| public @NonNull Disposable |
| once | back to summary |
|---|---|
| pack-priv final AtomicBoolean once | |
| pool | back to summary |
|---|---|
| private final IoScheduler. | |
| tasks | back to summary |
|---|---|
| private final CompositeDisposable tasks | |
| threadWorker | back to summary |
|---|---|
| private final IoScheduler. | |
| EventLoopWorker | back to summary |
|---|---|
| pack-priv EventLoopWorker(IoScheduler. | |
| 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 @NonNull Disposable schedule(@NonNull Runnable action, long delayTime, @NonNull TimeUnit unit) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public void |
| expirationTime | back to summary |
|---|---|
| pack-priv long expirationTime | |
| ThreadWorker | back to summary |
|---|---|
| pack-priv ThreadWorker(ThreadFactory threadFactory) | |
| getExpirationTime | back to summary |
|---|---|
| public long getExpirationTime() | |
| setExpirationTime | back to summary |
|---|---|
| public void setExpirationTime(long expirationTime) | |