| 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 @NonNull Disposable | |
| public @NonNull Disposable | |
| public @NonNull ScheduledRunnable | Returns: the ScheduledRunnable instancethe runnable instance run, long the time to delay the execution delayTime, @NonNull TimeUnit the time unit unit, @Nullable DisposableContainer the optional tracker parent to add the created ScheduledRunnable instance to before it gets scheduled parent)Wraps and returns 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 @NonNull Disposable schedule(final @NonNull Runnable run) | |
| schedule | back to summary |
|---|---|
| public @NonNull Disposable schedule(final @NonNull Runnable action, long delayTime, @NonNull TimeUnit unit) | |
| scheduleActual | back to summary |
|---|---|
| public @NonNull ScheduledRunnable scheduleActual(final Runnable run, long delayTime, @NonNull TimeUnit unit, @Nullable DisposableContainer parent) Wraps and returns the given runnable into a ScheduledRunnable and schedules it on the underlying ScheduledExecutorService.
| |
| 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. | |