| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | KEY_COMPUTATION_PRIORITY
The name of the system property for setting the thread priority for this Scheduler. |
| pack-priv static final String | KEY_MAX_THREADS
Key to setting the maximum number of computation scheduler threads. |
| pack-priv static final int | MAX_THREADS
The maximum number of computation scheduler threads. |
| pack-priv static final ComputationScheduler. | NONE
This will indicate no pool is active. |
| pack-priv final AtomicReference | |
| pack-priv static final ComputationScheduler. | |
| pack-priv static final RxThreadFactory | |
| private static final String | THREAD_NAME_PREFIX
Manages a fixed number of workers. |
| pack-priv final ThreadFactory |
| Access | Constructor and Description |
|---|---|
| public | ComputationScheduler()
Create a scheduler with pool size equal to the available processor count and using least-recent worker selection policy. |
| public | ComputationScheduler(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)Create a scheduler with pool size equal to the available processor count and using least-recent worker selection policy. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static int | |
| public @NonNull Scheduler. | createWorker()
Implements abstract io. Scheduler. that represents sequential execution of actions.
|
| public void | |
| 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. |
| KEY_COMPUTATION_PRIORITY | back to summary |
|---|---|
| private static final String KEY_COMPUTATION_PRIORITY The name of the system property for setting the thread priority for this Scheduler. | |
| KEY_MAX_THREADS | back to summary |
|---|---|
| pack-priv static final String KEY_MAX_THREADS Key to setting the maximum number of computation scheduler threads. Zero or less is interpreted as use available. Capped by available. | |
| MAX_THREADS | back to summary |
|---|---|
| pack-priv static final int MAX_THREADS The maximum number of computation scheduler threads. | |
| NONE | back to summary |
|---|---|
| pack-priv static final ComputationScheduler. This will indicate no pool is active. | |
| pool | back to summary |
|---|---|
| pack-priv final AtomicReference<ComputationScheduler. | |
| SHUTDOWN_WORKER | back to summary |
|---|---|
| pack-priv static final ComputationScheduler. | |
| THREAD_FACTORY | back to summary |
|---|---|
| pack-priv static final RxThreadFactory THREAD_FACTORY | |
| THREAD_NAME_PREFIX | back to summary |
|---|---|
| private static final String THREAD_NAME_PREFIX Manages a fixed number of workers. | |
| threadFactory | back to summary |
|---|---|
| pack-priv final ThreadFactory threadFactory | |
| ComputationScheduler | back to summary |
|---|---|
| public ComputationScheduler() Create a scheduler with pool size equal to the available processor count and using least-recent worker selection policy. | |
| ComputationScheduler | back to summary |
|---|---|
| public ComputationScheduler(ThreadFactory threadFactory) Create a scheduler with pool size equal to the available processor count and using least-recent worker selection policy.
| |
| cap | back to summary |
|---|---|
| pack-priv static int cap(int cpuCount, int paramThreads) | |
| 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 | |
| createWorkers | back to summary |
|---|---|
public void createWorkers(int number, SchedulerMultiWorkerSupport.
| |
| 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 |
|---|---|
| private final ListCompositeDisposable | |
| pack-priv volatile boolean | |
| private final ComputationScheduler. | |
| private final ListCompositeDisposable | |
| private 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 | |
| public @NonNull Disposable |
| both | back to summary |
|---|---|
| private final ListCompositeDisposable both | |
| disposed | back to summary |
|---|---|
| pack-priv volatile boolean disposed | |
| poolWorker | back to summary |
|---|---|
| private final ComputationScheduler. | |
| serial | back to summary |
|---|---|
| private final ListCompositeDisposable serial | |
| timed | back to summary |
|---|---|
| private final CompositeDisposable timed | |
| EventLoopWorker | back to summary |
|---|---|
| pack-priv EventLoopWorker(ComputationScheduler. | |
| 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 action) | |
| schedule | back to summary |
|---|---|
| public @NonNull Disposable schedule(@NonNull Runnable action, long delayTime, @NonNull TimeUnit unit) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv final ComputationScheduler. | |
| pack-priv long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public ComputationScheduler. | |
| public void |
| cores | back to summary |
|---|---|
| pack-priv final int cores | |
| eventLoops | back to summary |
|---|---|
| pack-priv final ComputationScheduler. | |
| n | back to summary |
|---|---|
| pack-priv long n | |
| FixedSchedulerPool | back to summary |
|---|---|
| pack-priv FixedSchedulerPool(int maxThreads, ThreadFactory threadFactory) | |
| createWorkers | back to summary |
|---|---|
public void createWorkers(int number, SchedulerMultiWorkerSupport.
| |
| getEventLoop | back to summary |
|---|---|
| public ComputationScheduler. | |
| shutdown | back to summary |
|---|---|
| public void shutdown() | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| PoolWorker | back to summary |
|---|---|
| pack-priv PoolWorker(ThreadFactory threadFactory) | |