| 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 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 EventLoopsScheduler. | NONE
This will indicate no pool is active. |
| pack-priv final AtomicReference | |
| pack-priv static final EventLoopsScheduler. | |
| pack-priv final ThreadFactory |
| Access | Constructor and Description |
|---|---|
| public | EventLoopsScheduler(ThreadFactory
the factory to use with the executors 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 |
|---|---|
| public Scheduler. | createWorker()
Implements abstract rx. Scheduler. that represents serial execution of actions.
|
| public Subscription | Returns: the subscriptionthe action to schedule action)Schedules the action directly on one of the event loop workers without the additional infrastructure and checking. |
| public void | shutdown()
Implements rx. |
| public void | start()
Implements rx. |
| 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 EventLoopsScheduler. This will indicate no pool is active. | |
| pool | back to summary |
|---|---|
| pack-priv final AtomicReference<EventLoopsScheduler. | |
| SHUTDOWN_WORKER | back to summary |
|---|---|
| pack-priv static final EventLoopsScheduler. | |
| threadFactory | back to summary |
|---|---|
| pack-priv final ThreadFactory threadFactory | |
| EventLoopsScheduler | back to summary |
|---|---|
| public EventLoopsScheduler(ThreadFactory threadFactory) Create a scheduler with pool size equal to the available processor count and using least-recent worker selection policy.
| |
| createWorker | back to summary |
|---|---|
| public Scheduler. Implements abstract rx. Doc from rx. Retrieves or creates a new
When work is completed it should be unsubscribed using
Work on a | |
| scheduleDirect | back to summary |
|---|---|
| public Subscription scheduleDirect(Action0 action) Schedules the action directly on one of the event loop workers without the additional infrastructure and checking.
| |
| shutdown | back to summary |
|---|---|
| public void shutdown() Implements rx. Doc from rx. Instructs the Scheduler instance to stop threads and stop accepting tasks on any outstanding Workers. Implementations should make sure the call is idempotent and thread-safe.
| |
| start | back to summary |
|---|---|
| public void start() Implements rx. Doc from rx. Allows the Scheduler instance to start threads and accept tasks on them. Implementations should make sure the call is idempotent and thread-safe.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final SubscriptionList | |
| private final EventLoopsScheduler. | |
| private final SubscriptionList | |
| private final CompositeSubscription |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | isUnsubscribed()
Implements rx. Subscription is currently unsubscribed.
|
| public Subscription | schedule(final Action0
Action to schedule action)Implements abstract rx. |
| public Subscription | schedule(final Action0
the Action to schedule action, long time to wait before executing the action; non-positive values indicate an non-delayed
schedule delayTime, TimeUnit the time unit of unit)delayTimeImplements abstract rx. |
| public void | unsubscribe()
Implements rx. Subscriber that was registered when this Subscription
was received.
|
| both | back to summary |
|---|---|
| private final SubscriptionList both | |
| poolWorker | back to summary |
|---|---|
| private final EventLoopsScheduler. | |
| serial | back to summary |
|---|---|
| private final SubscriptionList serial | |
| timed | back to summary |
|---|---|
| private final CompositeSubscription timed | |
| EventLoopWorker | back to summary |
|---|---|
| pack-priv EventLoopWorker(EventLoopsScheduler. | |
| isUnsubscribed | back to summary |
|---|---|
| public boolean isUnsubscribed() Implements rx. Doc from rx. Indicates whether this
| |
| schedule | back to summary |
|---|---|
| public Subscription schedule(final Action0 action) Implements abstract rx. Doc from rx. Schedules an Action for execution.
| |
| schedule | back to summary |
|---|---|
| public Subscription schedule(final Action0 action, long delayTime, TimeUnit unit) Implements abstract rx. Doc from rx. Schedules an Action for execution at some point in the future.
Note to implementors: non-positive
| |
| unsubscribe | back to summary |
|---|---|
| public void unsubscribe() Implements rx. Doc from rx. Stops the receipt of notifications on the
This allows deregistering an
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv final EventLoopsScheduler. | |
| pack-priv long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public EventLoopsScheduler. | |
| public void |
| cores | back to summary |
|---|---|
| pack-priv final int cores | |
| eventLoops | back to summary |
|---|---|
| pack-priv final EventLoopsScheduler. | |
| n | back to summary |
|---|---|
| pack-priv long n | |
| FixedSchedulerPool | back to summary |
|---|---|
| pack-priv FixedSchedulerPool(ThreadFactory threadFactory, int maxThreads) | |
| getEventLoop | back to summary |
|---|---|
| public EventLoopsScheduler. | |
| shutdown | back to summary |
|---|---|
| public void shutdown() | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| PoolWorker | back to summary |
|---|---|
| pack-priv PoolWorker(ThreadFactory threadFactory) | |