| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Object | |
| private static final long | NANO_ORIGIN
Base of nanosecond timings, to avoid wrapping |
| private final DelayQueue | |
| private volatile boolean | |
| private final Lock | |
| private static volatile TimerQueue |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| private void | |
| pack-priv boolean | |
| private static long | |
| pack-priv void | |
| public void | |
| public static TimerQueue | |
| pack-priv void | |
| public String |
| classLock | back to summary |
|---|---|
| private static final Object classLock | |
| NANO_ORIGIN | back to summary |
|---|---|
| private static final long NANO_ORIGIN Base of nanosecond timings, to avoid wrapping | |
| queue | back to summary |
|---|---|
| private final DelayQueue<TimerQueue. | |
| running | back to summary |
|---|---|
| private volatile boolean running | |
| runningLock | back to summary |
|---|---|
| private final Lock runningLock | |
| sharedInstance | back to summary |
|---|---|
| private static volatile TimerQueue sharedInstance | |
| TimerQueue | back to summary |
|---|---|
| public TimerQueue() Constructor for TimerQueue. | |
| addTimer | back to summary |
|---|---|
| pack-priv void addTimer(Timer timer, long delayMillis) | |
| addTimer | back to summary |
|---|---|
| private void addTimer(TimerQueue. | |
| containsTimer | back to summary |
|---|---|
| pack-priv boolean containsTimer(Timer timer) | |
| now | back to summary |
|---|---|
| private static long now() Returns nanosecond time offset by origin | |
| removeTimer | back to summary |
|---|---|
| pack-priv void removeTimer(Timer timer) | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |
| sharedInstance | back to summary |
|---|---|
| public static TimerQueue sharedInstance() | |
| startIfNeeded | back to summary |
|---|---|
| pack-priv void startIfNeeded() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| private final long | sequenceNumber
Sequence number to break ties FIFO |
| private static final AtomicLong | sequencer
Sequence number to break scheduling ties, and in turn to guarantee FIFO order among tied entries. |
| private volatile long | time
The time the task is enabled to execute in nanoTime units |
| private final Timer |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(Delayed other)
Implements java. Compares this object with the specified object for order. |
| public final long | getDelay(TimeUnit unit)
Implements java. Returns the remaining delay associated with this object, in the given time unit. |
| pack-priv final Timer | |
| pack-priv final void |
| sequenceNumber | back to summary |
|---|---|
| private final long sequenceNumber Sequence number to break ties FIFO | |
| sequencer | back to summary |
|---|---|
| private static final AtomicLong sequencer Sequence number to break scheduling ties, and in turn to guarantee FIFO order among tied entries. | |
| time | back to summary |
|---|---|
| private volatile long time The time the task is enabled to execute in nanoTime units | |
| timer | back to summary |
|---|---|
| private final Timer timer | |
| DelayedTimer | back to summary |
|---|---|
| pack-priv DelayedTimer(Timer timer, long nanos) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(Delayed other) 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 | |
| getDelay | back to summary |
|---|---|
| public final long getDelay(TimeUnit unit) Implements java. Doc from java. Returns the remaining delay associated with this object, in the given time unit. | |
| getTimer | back to summary |
|---|---|
| pack-priv final Timer getTimer() | |
| setTime | back to summary |
|---|---|
| pack-priv final void setTime(long nanos) | |