| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | Async.AsyncEvictionListener<K, V>
An eviction listener that forwards the value stored in a |
| pack-priv static class | |
| pack-priv static class | Async.AsyncRemovalListener<K, V>
A removal listener that asynchronously forwards the value stored in a |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final long |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static <V> @Nullable V | getIfReady(@Nullable CompletableFuture<V> future)
Returns the current value or null if either not done or failed. |
| pack-priv static <V> @Nullable V | getWhenSuccessful(@Nullable CompletableFuture<V> future)
Returns the value when completed successfully or null if failed. |
| pack-priv static boolean |
| ASYNC_EXPIRY | back to summary |
|---|---|
| pack-priv static final long ASYNC_EXPIRY | |
| Async | back to summary |
|---|---|
| private Async() | |
| getIfReady | back to summary |
|---|---|
| pack-priv static <V> @Nullable V getIfReady(@Nullable CompletableFuture<V> future) Returns the current value or null if either not done or failed.
| |
| getWhenSuccessful | back to summary |
|---|---|
| pack-priv static <V> @Nullable V getWhenSuccessful(@Nullable CompletableFuture<V> future) Returns the value when completed successfully or null if failed. | |
| isReady | back to summary |
|---|---|
| pack-priv static boolean isReady(@Nullable CompletableFuture<?> future) Returns if the future has successfully completed. | |
CompletableFuture to the
user-supplied eviction listener.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final RemovalListener | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| pack-priv Object |
| delegate | back to summary |
|---|---|
| pack-priv final RemovalListener<K, V> delegate | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| AsyncEvictionListener | back to summary |
|---|---|
| pack-priv AsyncEvictionListener(RemovalListener<K, V> delegate) | |
| onRemoval | back to summary |
|---|---|
public void onRemoval(@Nullable K key, @Nullable CompletableFuture<V> future, RemovalCause cause)
| |
| writeReplace | back to summary |
|---|---|
| pack-priv Object writeReplace() | |
ASYNC_EXPIRY to indicate that the entry should not be evicted due to an expiry
constraint. If the value is computed successfully then the entry must be reinserted so that the
expiration is updated and the expiration timeouts reflect the value once present. The
duration's maximum range is reserved to coordinate with the asynchronous life cycle.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Expiry | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public long | expireAfterCreate(K
the key represented by this entry key, CompletableFuture<V> the value represented by this entry future, long the current time, in nanoseconds currentTime)Implements com. |
| public long | |
| public long | |
| pack-priv Object |
| delegate | back to summary |
|---|---|
| pack-priv final Expiry<? super K, ? super V> delegate | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| AsyncExpiry | back to summary |
|---|---|
| pack-priv AsyncExpiry(Expiry<? super K, ? super V> delegate) | |
| expireAfterCreate | back to summary |
|---|---|
| public long expireAfterCreate(K key, CompletableFuture<V> future, long currentTime) Implements com. Doc from com. Specifies that the entry should be automatically removed from the cache once the duration has
elapsed after the entry's creation. To indicate no expiration, an entry may be given an
excessively long period, such as Note The
| |
| expireAfterRead | back to summary |
|---|---|
public long expireAfterRead(K key, CompletableFuture<V> future, long currentTime, long currentDuration)
| |
| expireAfterUpdate | back to summary |
|---|---|
public long expireAfterUpdate(K key, CompletableFuture<V> future, long currentTime, long currentDuration)
| |
| writeReplace | back to summary |
|---|---|
| pack-priv Object writeReplace() | |
CompletableFuture
if successful to the user-supplied removal listener.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final RemovalListener | |
| pack-priv final Executor | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| pack-priv Object |
| delegate | back to summary |
|---|---|
| pack-priv final RemovalListener<K, V> delegate | |
| executor | back to summary |
|---|---|
| pack-priv final Executor executor | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| AsyncRemovalListener | back to summary |
|---|---|
| pack-priv AsyncRemovalListener(RemovalListener<K, V> delegate, Executor executor) | |
| onRemoval | back to summary |
|---|---|
public void onRemoval(@Nullable K key, @Nullable CompletableFuture<V> future, RemovalCause cause)
| |
| writeReplace | back to summary |
|---|---|
| pack-priv Object writeReplace() | |
0 to indicate that the entry should not be evicted due to a size constraint. If the
value is computed successfully then the entry must be reinserted so that the weight is updated
and the expiration timeouts reflect the value once present. This can be done safely using
Map#replace(Object, Object, Object).
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Weigher | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | weigh(K
the key to weigh key, CompletableFuture<V> the value to weigh future)Implements com. |
| pack-priv Object |
| delegate | back to summary |
|---|---|
| pack-priv final Weigher<K, V> delegate | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| AsyncWeigher | back to summary |
|---|---|
| pack-priv AsyncWeigher(Weigher<K, V> delegate) | |
| weigh | back to summary |
|---|---|
| public int weigh(K key, CompletableFuture<V> future) Implements com. Doc from com. Returns the weight of a cache entry. There is no unit for entry weights; rather they are simply relative to each other.
| |
| writeReplace | back to summary |
|---|---|
| pack-priv Object writeReplace() | |