| Modifier and Type | Field and Description |
|---|---|
| private static volatile Object | cachedSetRemoveOnCancelPolicyMethod
Improves performance of |
| private final ScheduledExecutorService | |
| private static final ConcurrentHashMap | |
| private static final String | FREQUENCY_KEY
The purge frequency in milliseconds. |
| pack-priv volatile boolean | |
| private static final AtomicReference | |
| private static final String | PURGE_FORCE_KEY
Force the use of purge (true/false). |
| public static final int | PURGE_FREQUENCY
The purge frequency in milliseconds. |
| private static final String | |
| private static final Object | SET_REMOVE_ON_CANCEL_POLICY_METHOD_NOT_SUPPORTED
Possible value of |
| private static final boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | deregisterExecutor(ScheduledExecutorService
a scheduled thread pool executor instance service)Deregisters the executor service. |
| pack-priv static Method | findSetRemoveOnCancelPolicyMethod(ScheduledExecutorService
whose class will be used to search for required method. executor)Tries to find |
| public boolean | isUnsubscribed()
Implements rx. Subscription is currently unsubscribed.
|
| pack-priv static void | |
| public static void | registerExecutor(ScheduledThreadPoolExecutor
a scheduled thread pool executor instance service)Registers the given executor service and starts the purge thread if not already started. |
| 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 ScheduledAction | Returns: the wrapper ScheduledActionthe action to wrap and schedule action, long the delay in execution delayTime, TimeUnit the time unit of the delay unit)Schedules the given action by wrapping it into a ScheduledAction on the underlying ExecutorService, returning the ScheduledAction. |
| public ScheduledAction | |
| public ScheduledAction | |
| public static boolean | Returns: true if the policy was successfully enabledthe executor to call setRemoveOnCancelPolicy if available. executor)Tries to enable the Java 7+ setRemoveOnCancelPolicy. |
| public void | unsubscribe()
Implements rx. Subscriber that was registered when this Subscription
was received.
|
| cachedSetRemoveOnCancelPolicyMethod | back to summary |
|---|---|
| private static volatile Object cachedSetRemoveOnCancelPolicyMethod Improves performance of | |
| executor | back to summary |
|---|---|
| private final ScheduledExecutorService executor | |
| EXECUTORS | back to summary |
|---|---|
| private static final ConcurrentHashMap<ScheduledThreadPoolExecutor, ScheduledThreadPoolExecutor> EXECUTORS | |
| FREQUENCY_KEY | back to summary |
|---|---|
| private static final String FREQUENCY_KEY The purge frequency in milliseconds. | |
| isUnsubscribed | back to summary |
|---|---|
| pack-priv volatile boolean isUnsubscribed | |
| PURGE | back to summary |
|---|---|
| private static final AtomicReference<ScheduledExecutorService> PURGE | |
| PURGE_FORCE_KEY | back to summary |
|---|---|
| private static final String PURGE_FORCE_KEY Force the use of purge (true/false). | |
| PURGE_FREQUENCY | back to summary |
|---|---|
| public static final int PURGE_FREQUENCY The purge frequency in milliseconds. | |
| PURGE_THREAD_PREFIX | back to summary |
|---|---|
| private static final String PURGE_THREAD_PREFIX | |
| SET_REMOVE_ON_CANCEL_POLICY_METHOD_NOT_SUPPORTED | back to summary |
|---|---|
| private static final Object SET_REMOVE_ON_CANCEL_POLICY_METHOD_NOT_SUPPORTED Possible value of | |
| SHOULD_TRY_ENABLE_CANCEL_POLICY | back to summary |
|---|---|
| private static final boolean SHOULD_TRY_ENABLE_CANCEL_POLICY | |
| NewThreadWorker | back to summary |
|---|---|
| public NewThreadWorker(ThreadFactory threadFactory) | |
| deregisterExecutor | back to summary |
|---|---|
| public static void deregisterExecutor(ScheduledExecutorService service) Deregisters the executor service.
| |
| findSetRemoveOnCancelPolicyMethod | back to summary |
|---|---|
| pack-priv static Method findSetRemoveOnCancelPolicyMethod(ScheduledExecutorService executor) Tries to find
| |
| isUnsubscribed | back to summary |
|---|---|
| public boolean isUnsubscribed() Implements rx. Doc from rx. Indicates whether this
| |
| purgeExecutors | back to summary |
|---|---|
| pack-priv static void purgeExecutors() Purges each registered executor and eagerly evicts shutdown executors. | |
| registerExecutor | back to summary |
|---|---|
| public static void registerExecutor(ScheduledThreadPoolExecutor service) Registers the given executor service and starts the purge thread if not already started.
| |
| 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
| |
| scheduleActual | back to summary |
|---|---|
| public ScheduledAction scheduleActual(final Action0 action, long delayTime, TimeUnit unit) Schedules the given action by wrapping it into a ScheduledAction on the underlying ExecutorService, returning the ScheduledAction.
| |
| scheduleActual | back to summary |
|---|---|
| public ScheduledAction scheduleActual(final Action0 action, long delayTime, TimeUnit unit, CompositeSubscription parent) | |
| scheduleActual | back to summary |
|---|---|
| public ScheduledAction scheduleActual(final Action0 action, long delayTime, TimeUnit unit, SubscriptionList parent) | |
| tryEnableCancelPolicy | back to summary |
|---|---|
| public static boolean tryEnableCancelPolicy(ScheduledExecutorService executor) Tries to enable the Java 7+ setRemoveOnCancelPolicy.
| |
| unsubscribe | back to summary |
|---|---|
| public void unsubscribe() Implements rx. Doc from rx. Stops the receipt of notifications on the
This allows deregistering an
| |