| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile boolean | |
| private final ScheduledExecutorService |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements io. |
| public boolean | isDisposed()
Implements io. |
| public Disposable | schedule(final Runnable
Runnable to schedule run)Overrides io. |
| public Disposable | schedule(final Runnable
the Runnable 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 io. |
| public ScheduledRunnable | Returns: the ScheduledRunnable instancethe runnable instance run, long the time to delay the execution delayTime, TimeUnit the time unit unit, DisposableContainer the optional tracker parent to add the created ScheduledRunnable instance to before it gets scheduled parent)Wraps the given runnable into a ScheduledRunnable and schedules it on the underlying ScheduledExecutorService. |
| public Disposable | Returns: the ScheduledRunnable instancethe Runnable to execute in a delayed fashion run, long the delay amount delayTime, TimeUnit the delay time unit unit)Schedules the given runnable on the underlying executor directly and returns its future wrapped into a Disposable. |
| public Disposable | Returns: the ScheduledRunnable instancethe Runnable to execute in a periodic fashion run, long the initial delay amount initialDelay, long the repeat period amount period, TimeUnit the time unit for both the initialDelay and period unit)Schedules the given runnable periodically on the underlying executor directly and returns its future wrapped into a Disposable. |
| public void |
| disposed | back to summary |
|---|---|
| pack-priv volatile boolean disposed | |
| executor | back to summary |
|---|---|
| private final ScheduledExecutorService executor | |
| NewThreadWorker | back to summary |
|---|---|
| public NewThreadWorker(ThreadFactory threadFactory) | |
| 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 Disposable schedule(final Runnable run) Overrides io. Doc from io. Schedules a Runnable for execution without any time delay. The default implementation delegates to
| |
| schedule | back to summary |
|---|---|
| public Disposable schedule(final Runnable action, long delayTime, TimeUnit unit) Implements abstract io. Doc from io. Schedules an Runnable for execution at some point in the future specified by a time delay relative to the current time.
Note to implementors: non-positive
| |
| scheduleActual | back to summary |
|---|---|
| public ScheduledRunnable scheduleActual(final Runnable run, long delayTime, TimeUnit unit, DisposableContainer parent) Wraps the given runnable into a ScheduledRunnable and schedules it on the underlying ScheduledExecutorService. If the schedule has been rejected, the ScheduledRunnable.wasScheduled will return false.
| |
| scheduleDirect | back to summary |
|---|---|
| public Disposable scheduleDirect(final Runnable run, long delayTime, TimeUnit unit) Schedules the given runnable on the underlying executor directly and returns its future wrapped into a Disposable.
| |
| schedulePeriodicallyDirect | back to summary |
|---|---|
| public Disposable schedulePeriodicallyDirect(Runnable run, long initialDelay, long period, TimeUnit unit) Schedules the given runnable periodically on the underlying executor directly and returns its future wrapped into a Disposable.
| |
| shutdown | back to summary |
|---|---|
| public void shutdown() Shuts down the underlying executor in a non-interrupting fashion. | |