| 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 TrampolineScheduler |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Scheduler. | createWorker()
Implements abstract io. Scheduler. that represents sequential execution of actions.
|
| public static TrampolineScheduler | |
| public Disposable | scheduleDirect(Runnable
the task to execute run)Overrides io. |
| public Disposable | scheduleDirect(Runnable
the task to schedule run, long the delay amount, non-positive values indicate non-delayed scheduling delay, TimeUnit the unit of measure of the delay amount unit)Overrides io. |
| INSTANCE | back to summary |
|---|---|
| private static final TrampolineScheduler INSTANCE | |
| TrampolineScheduler | back to summary |
|---|---|
| pack-priv TrampolineScheduler() | |
| createWorker | back to summary |
|---|---|
| public Scheduler. Implements abstract io. Doc from io. Retrieves or creates a new
When work is completed, the
Work on a | |
| instance | back to summary |
|---|---|
| public static TrampolineScheduler instance() | |
| scheduleDirect | back to summary |
|---|---|
| public Disposable scheduleDirect(Runnable run) Overrides io. Doc from io. Schedules the given task on this Scheduler without any time delay. This method is safe to be called from multiple threads but there are no ordering or non-overlapping guarantees between tasks.
| |
| scheduleDirect | back to summary |
|---|---|
| public Disposable scheduleDirect(Runnable run, long delay, TimeUnit unit) Overrides io. Doc from io. Schedules the execution of the given task with the given time delay. This method is safe to be called from multiple threads but there are no ordering guarantees between tasks.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final Runnable | |
| private final TrampolineScheduler. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| execTime | back to summary |
|---|---|
| private final long execTime | |
| run | back to summary |
|---|---|
| private final Runnable run | |
| worker | back to summary |
|---|---|
| private final TrampolineScheduler. | |
| SleepingRunnable | back to summary |
|---|---|
| pack-priv SleepingRunnable(Runnable run, TrampolineScheduler. | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv volatile boolean | |
| pack-priv final long | |
| pack-priv final Runnable |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(TrampolineScheduler.
the object to be compared. thatImplements java. |
| count | back to summary |
|---|---|
| pack-priv final int count | |
| disposed | back to summary |
|---|---|
| pack-priv volatile boolean disposed | |
| execTime | back to summary |
|---|---|
| pack-priv final long execTime | |
| run | back to summary |
|---|---|
| pack-priv final Runnable run | |
| TimedRunnable | back to summary |
|---|---|
| pack-priv TimedRunnable(Runnable run, Long execTime, int count) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(TrampolineScheduler. Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final AtomicInteger | |
| pack-priv volatile boolean | |
| pack-priv final PriorityBlockingQueue | |
| private final AtomicInteger |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements io. |
| pack-priv Disposable | |
| public boolean | isDisposed()
Implements io. |
| public Disposable | schedule(Runnable
Runnable to schedule action)Overrides io. |
| public Disposable | schedule(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. |
| counter | back to summary |
|---|---|
| pack-priv final AtomicInteger counter | |
| disposed | back to summary |
|---|---|
| pack-priv volatile boolean disposed | |
| queue | back to summary |
|---|---|
| pack-priv final PriorityBlockingQueue<TrampolineScheduler. | |
| wip | back to summary |
|---|---|
| private final AtomicInteger wip | |
| TrampolineWorker | back to summary |
|---|---|
| pack-priv TrampolineWorker() | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements io. Doc from io. Dispose the resource, the operation should be idempotent.
| |
| enqueue | back to summary |
|---|---|
| pack-priv Disposable enqueue(Runnable action, long execTime) | |
| 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(Runnable action) 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(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
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final TrampolineScheduler. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| timedRunnable | back to summary |
|---|---|
| pack-priv final TrampolineScheduler. | |
| AppendToQueueTask | back to summary |
|---|---|
| pack-priv AppendToQueueTask(TrampolineScheduler. | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |