| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Cache. | |
| private static final Future | |
| private static final AtomicReferenceFieldUpdater | |
| pack-priv static final int | |
| private final ConcurrentMap |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv final void | |
| pack-priv final void | |
| pack-priv final boolean | |
| protected abstract boolean | |
| pack-priv final List | |
| protected abstract boolean | shouldReplaceAll(E entry)
Returns |
| pack-priv final int | |
| protected void |
| CANCELLED | back to summary |
|---|---|
| private static final Cache. | |
| CANCELLED_FUTURE | back to summary |
|---|---|
| private static final Future<?> CANCELLED_FUTURE | |
| FUTURE_UPDATER | back to summary |
|---|---|
| private static final AtomicReferenceFieldUpdater<Cache. | |
| MAX_SUPPORTED_TTL_SECS | back to summary |
|---|---|
| pack-priv static final int MAX_SUPPORTED_TTL_SECS | |
| resolveCache | back to summary |
|---|---|
| private final ConcurrentMap<String, Cache<E>. | |
| Cache | back to summary |
|---|---|
| pack-priv Cache() | |
| cache | back to summary |
|---|---|
| pack-priv final void cache(String hostname, E value, int ttl, EventLoop loop) Cache a value for the given hostname that will automatically expire once the TTL is reached. | |
| clear | back to summary |
|---|---|
| pack-priv final void clear() Remove everything from the cache. | |
| clear | back to summary |
|---|---|
| pack-priv final boolean clear(String hostname) Clear all entries (if anything exists) for the given hostname and return | |
| equals | back to summary |
|---|---|
| protected abstract boolean equals(E entry, E otherEntry) Returns | |
| get | back to summary |
|---|---|
| pack-priv final List Returns all caches entries for the given hostname. | |
| shouldReplaceAll | back to summary |
|---|---|
| protected abstract boolean shouldReplaceAll(E entry) Returns | |
| size | back to summary |
|---|---|
| pack-priv final int size() Return the number of hostnames for which we have cached something. | |
| sortEntries | back to summary |
|---|---|
| protected void sortEntries(String hostname, List<E> entries) Sort the | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile Cache. | |
| private final String |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv boolean | |
| public void | |
| private void |
| expirationFuture | back to summary |
|---|---|
| pack-priv volatile Cache. | |
| hostname | back to summary |
|---|---|
| private final String hostname | |
| Entries | back to summary |
|---|---|
| pack-priv Entries(String hostname) | |
| add | back to summary |
|---|---|
| pack-priv void add(E e, int ttl, EventLoop loop) | |
| clearAndCancel | back to summary |
|---|---|
| pack-priv boolean clearAndCancel() | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| scheduleCacheExpirationIfNeeded | back to summary |
|---|---|
| private void scheduleCacheExpirationIfNeeded(int ttl, EventLoop loop) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final long | |
| pack-priv final Future |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public int | compareTo(Delayed
the object to be compared. other)Implements java. |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public long | getDelay(TimeUnit
the time unit unit)Implements java. |
| public int |
| deadlineNanos | back to summary |
|---|---|
| pack-priv final long deadlineNanos | |
| future | back to summary |
|---|---|
| pack-priv final Future<?> future | |
| FutureAndDelay | back to summary |
|---|---|
| private FutureAndDelay(Future<?> future, int ttl) | |
| cancel | back to summary |
|---|---|
| pack-priv void cancel() | |
| 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 | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getDelay | back to summary |
|---|---|
| public long getDelay(TimeUnit unit) Implements java. Doc from java. Returns the remaining delay associated with this object, in the given time unit. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |