| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | |
| pack-priv class | |
| pack-priv static class | |
| pack-priv abstract class | TimerWheel.Traverser
An iterator with rough ordering that can be specialized for either direction. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int[] | |
| pack-priv long | |
| pack-priv static final long[] | |
| pack-priv static final long[] | |
| pack-priv final Node |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | advance(BoundedLocalCache<K, V>
the instance that the entries belong to cache, long the current time, in nanoseconds currentTimeNanos)Advances the timer and evicts entries that have expired. |
| public Iterator | descendingIterator()
Returns an iterator roughly ordered by the expiration time from the entries least likely to expire (youngest) to the entries most likely to expire (oldest). |
| public void | |
| pack-priv void | expire(BoundedLocalCache<K, V>
the instance that the entries belong to cache, int the timing wheel being operated on index, long the previous number of ticks previousTicks, long the number of additional ticks delta)Expires entries or reschedules into the proper bucket if still active. |
| pack-priv Node | Returns: the sentinel at the head of the bucketthe time when the event fires time)Determines the bucket that the timer event should be added to. |
| public long | |
| public Iterator | iterator()
Implements java. |
| pack-priv void | |
| pack-priv long | peekAhead(int
the timing wheel being operated on index)Returns the duration when the wheel's next bucket expires, or |
| public void | |
| public void | |
| pack-priv void |
| BUCKETS | back to summary |
|---|---|
| pack-priv static final int[] BUCKETS | |
| nanos | back to summary |
|---|---|
| pack-priv long nanos | |
| SHIFT | back to summary |
|---|---|
| pack-priv static final long[] SHIFT | |
| SPANS | back to summary |
|---|---|
| pack-priv static final long[] SPANS | |
| wheel | back to summary |
|---|---|
| pack-priv final Node<K, V>[][] wheel | |
| TimerWheel | back to summary |
|---|---|
pack-priv TimerWheel()
| |
| advance | back to summary |
|---|---|
| public void advance(BoundedLocalCache<K, V> cache, long currentTimeNanos) Advances the timer and evicts entries that have expired.
| |
| descendingIterator | back to summary |
|---|---|
| public Iterator Returns an iterator roughly ordered by the expiration time from the entries least likely to expire (youngest) to the entries most likely to expire (oldest). The wheels are evaluated in order, but the timers that fall within the bucket's range are not sorted. | |
| deschedule | back to summary |
|---|---|
| public void deschedule(Node<K, V> node) Removes a timer event for this entry if present.
| |
| expire | back to summary |
|---|---|
| pack-priv void expire(BoundedLocalCache<K, V> cache, int index, long previousTicks, long delta) Expires entries or reschedules into the proper bucket if still active.
| |
| findBucket | back to summary |
|---|---|
| pack-priv Node Determines the bucket that the timer event should be added to.
| |
| getExpirationDelay | back to summary |
|---|---|
| public long getExpirationDelay() Returns the duration until the next bucket expires, or
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Returns an iterator roughly ordered by the expiration time from the entries most likely to expire (oldest) to the entries least likely to expire (youngest). The wheels are evaluated in order, but the timers that fall within the bucket's range are not sorted.
| |
| link | back to summary |
|---|---|
| pack-priv void link(Node<K, V> sentinel, Node<K, V> node) Adds the entry at the tail of the bucket's list. | |
| peekAhead | back to summary |
|---|---|
| pack-priv long peekAhead(int index) Returns the duration when the wheel's next bucket expires, or
| |
| reschedule | back to summary |
|---|---|
| public void reschedule(Node<K, V> node) Reschedules an active timer event for the node.
| |
| schedule | back to summary |
|---|---|
| public void schedule(Node<K, V> node) Schedules a timer event for the node.
| |
| unlink | back to summary |
|---|---|
| pack-priv void unlink(Node<K, V> node) Removes the entry from its bucket, if scheduled. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | |
| pack-priv @Nullable Node | goToNextBucket()
Implements abstract com. |
| pack-priv @Nullable Node | goToNextWheel()
Implements abstract com. |
| pack-priv boolean | isDone()
Implements abstract com. |
| pack-priv Node | sentinel()
Implements abstract com. |
| pack-priv Node | traverse(Node<K, V> node)
Implements abstract com. |
| steps | back to summary |
|---|---|
| pack-priv int steps | |
| wheelIndex | back to summary |
|---|---|
| pack-priv int wheelIndex | |
| AscendingIterator | back to summary |
|---|---|
| pack-priv AscendingIterator() | |
| bucketIndex | back to summary |
|---|---|
| pack-priv int bucketIndex() | |
| goToNextBucket | back to summary |
|---|---|
| pack-priv @Nullable Node Implements abstract com. Doc from com. Returns the sentinel for the wheel's next bucket, or null if the wheel is exhausted.
| |
| goToNextWheel | back to summary |
|---|---|
| pack-priv @Nullable Node Implements abstract com. Doc from com. Returns the sentinel for the next wheel's bucket position, or null if no more wheels.
| |
| isDone | back to summary |
|---|---|
| pack-priv boolean isDone() Implements abstract com. Doc from com. Returns if the iteration has completed.
| |
| sentinel | back to summary |
|---|---|
| pack-priv Node Implements abstract com. Doc from com. Returns the sentinel at the current wheel and bucket position.
| |
| traverse | back to summary |
|---|---|
| pack-priv Node Implements abstract com. Doc from com. Returns the node's successor, or the bucket's sentinel if at the end.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | |
| pack-priv @Nullable Node | goToNextBucket()
Implements abstract com. |
| pack-priv @Nullable Node | goToNextWheel()
Implements abstract com. |
| pack-priv boolean | isDone()
Implements abstract com. |
| pack-priv Node | sentinel()
Implements abstract com. |
| pack-priv Node | traverse(Node<K, V> node)
Implements abstract com. |
| steps | back to summary |
|---|---|
| pack-priv int steps | |
| wheelIndex | back to summary |
|---|---|
| pack-priv int wheelIndex | |
| DescendingIterator | back to summary |
|---|---|
| pack-priv DescendingIterator() | |
| bucketIndex | back to summary |
|---|---|
| pack-priv int bucketIndex() | |
| goToNextBucket | back to summary |
|---|---|
| pack-priv @Nullable Node Implements abstract com. Doc from com. Returns the sentinel for the wheel's next bucket, or null if the wheel is exhausted.
| |
| goToNextWheel | back to summary |
|---|---|
| pack-priv @Nullable Node Implements abstract com. Doc from com. Returns the sentinel for the next wheel's bucket position, or null if no more wheels.
| |
| isDone | back to summary |
|---|---|
| pack-priv boolean isDone() Implements abstract com. Doc from com. Returns if the iteration has completed.
| |
| sentinel | back to summary |
|---|---|
| pack-priv Node Implements abstract com. Doc from com. Returns the sentinel at the current wheel and bucket position.
| |
| traverse | back to summary |
|---|---|
| pack-priv Node Implements abstract com. Doc from com. Returns the node's successor, or the bucket's sentinel if at the end.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Node | |
| pack-priv Node |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | containsValue(Object value)
Implements abstract com. true if the given objects are considered equivalent.
|
| public void | die()
Implements abstract com. |
| public @Nullable K | getKey()
Implements abstract com. null if it has been reclaimed by the garbage collector.
|
| public Object | getKeyReference()
Implements abstract com. |
| public Node | |
| public Node | |
| public @Nullable V | getValue()
Implements abstract com. null if it has been reclaimed by the garbage collector.
|
| public Object | getValueReference()
Implements abstract com. |
| public boolean | isAlive()
Implements abstract com. |
| public boolean | isDead()
Implements abstract com. |
| public boolean | isRetired()
Implements abstract com. |
| public void | retire()
Implements abstract com. |
| public void | |
| public void | |
| public void |
| next | back to summary |
|---|---|
| pack-priv Node<K, V> next | |
| prev | back to summary |
|---|---|
| pack-priv Node<K, V> prev | |
| Sentinel | back to summary |
|---|---|
| pack-priv Sentinel() | |
| containsValue | back to summary |
|---|---|
| public boolean containsValue(Object value) Implements abstract com. Doc from com. Returns
| |
| die | back to summary |
|---|---|
| public void die() Implements abstract com. Doc from com. Sets the node to the dead state.
| |
| getKey | back to summary |
|---|---|
| public @Nullable K getKey() Implements abstract com. Doc from com. Return the key or
| |
| getKeyReference | back to summary |
|---|---|
| public Object getKeyReference() Implements abstract com. Doc from com. Returns the reference that the cache is holding the entry by. This is either the key if
strongly held or a
| |
| getNextInVariableOrder | back to summary |
|---|---|
| public Node Overrides com.
| |
| getPreviousInVariableOrder | back to summary |
|---|---|
| public Node Overrides com.
| |
| getValue | back to summary |
|---|---|
| public @Nullable V getValue() Implements abstract com. Doc from com. Return the value or
| |
| getValueReference | back to summary |
|---|---|
| public Object getValueReference() Implements abstract com. Doc from com. Returns the reference to the value. This is either the value if strongly held or a
| |
| isAlive | back to summary |
|---|---|
| public boolean isAlive() Implements abstract com. Doc from com. If the entry is available in the hash-table and page replacement policy.
| |
| isDead | back to summary |
|---|---|
| public boolean isDead() Implements abstract com. Doc from com. If the entry was removed from the hash-table and the page replacement policy.
| |
| isRetired | back to summary |
|---|---|
| public boolean isRetired() Implements abstract com. Doc from com. If the entry was removed from the hash-table and is awaiting removal from the page replacement policy.
| |
| retire | back to summary |
|---|---|
| public void retire() Implements abstract com. Doc from com. Sets the node to the retired state.
| |
| setNextInVariableOrder | back to summary |
|---|---|
public void setNextInVariableOrder(@Nullable Node<K, V> next)
| |
| setPreviousInVariableOrder | back to summary |
|---|---|
public void setPreviousInVariableOrder(@Nullable Node<K, V> prev)
| |
| setValue | back to summary |
|---|---|
public void setValue(V value, @Nullable ReferenceQueue<V> referenceQueue)
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv @Nullable Node | |
| pack-priv final long | |
| pack-priv @Nullable Node |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv @Nullable Node | |
| pack-priv abstract @Nullable Node | goToNextBucket()
Returns the sentinel for the wheel's next bucket, or null if the wheel is exhausted. |
| pack-priv abstract @Nullable Node | goToNextWheel()
Returns the sentinel for the next wheel's bucket position, or null if no more wheels. |
| public boolean | |
| pack-priv abstract boolean | |
| public Node | |
| pack-priv abstract Node | |
| pack-priv abstract Node |
| current | back to summary |
|---|---|
| pack-priv @Nullable Node<K, V> current | |
| expectedNanos | back to summary |
|---|---|
| pack-priv final long expectedNanos | |
| next | back to summary |
|---|---|
| pack-priv @Nullable Node<K, V> next | |
| Traverser | back to summary |
|---|---|
| pack-priv Traverser() | |
| computeNext | back to summary |
|---|---|
| pack-priv @Nullable Node | |
| goToNextBucket | back to summary |
|---|---|
| pack-priv abstract @Nullable Node Returns the sentinel for the wheel's next bucket, or null if the wheel is exhausted. | |
| goToNextWheel | back to summary |
|---|---|
| pack-priv abstract @Nullable Node Returns the sentinel for the next wheel's bucket position, or null if no more wheels. | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| isDone | back to summary |
|---|---|
| pack-priv abstract boolean isDone() Returns if the iteration has completed. | |
| next | back to summary |
|---|---|
| public Node Implements java. Doc from java. Returns the next element in the iteration.
| |
| sentinel | back to summary |
|---|---|
| pack-priv abstract Node Returns the sentinel at the current wheel and bucket position. | |
| traverse | back to summary |
|---|---|
| pack-priv abstract Node Returns the node's successor, or the bucket's sentinel if at the end. | |