| Modifier and Type | Class and Description |
|---|---|
| pack-priv abstract static class | |
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final LoadingCache | |
| private static final ThreadLocal | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public V | apply(K
the function argument key)Implements com. |
| public V | get(K key)
Implements com. key in this cache, first loading that value if
necessary.
|
| public ImmutableMap | getAll(Iterable<? extends K> keys)
Implements com. keys, creating or retrieving those values
if necessary.
|
| public V | getUnchecked(K key)
Implements com. key in this cache, first loading that value if
necessary.
|
| public void | refresh(K key)
Implements com. key, possibly asynchronously.
|
| cache | back to summary |
|---|---|
| private final LoadingCache<K, V> cache Hides com. | |
| nullBulkLoad | back to summary |
|---|---|
| private static final ThreadLocal<Boolean> nullBulkLoad | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| CaffeinatedGuavaLoadingCache | back to summary |
|---|---|
| pack-priv CaffeinatedGuavaLoadingCache(LoadingCache<K, V> cache) | |
| apply | back to summary |
|---|---|
| public V apply(K key) Implements com. Doc from java. Applies this function to the given argument.
| |
| get | back to summary |
|---|---|
| public V get(K key) throws ExecutionException Implements com. Doc from com. Returns the value associated with If another call to Caches loaded by a If the cache loader associated with this cache is known not to throw checked exceptions,
then prefer
| |
| getAll | back to summary |
|---|---|
| public ImmutableMap Implements com. Doc from com. Returns a map of the values associated with Caches loaded by a Note that duplicate elements in
| |
| getUnchecked | back to summary |
|---|---|
| public V getUnchecked(K key) Implements com. Doc from com. Returns the value associated with If another call to Caches loaded by a Warning this method silently converts checked exceptions to unchecked exceptions,
and should not be used with cache loaders which throw checked exceptions. In such cases use
| |
| refresh | back to summary |
|---|---|
| public void refresh(K key) Implements com. Doc from com. Loads a new value for Caches loaded by a Returns without doing anything if another thread is currently loading the value for
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final CacheLoader | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public CompletableFuture | asyncReload(K
the non-null key whose value should be loaded key, V the non-null old value corresponding to oldValue, Executor keythe executor with which the entry is asynchronously loaded executor)Overrides default com. key.
|
| cacheLoader | back to summary |
|---|---|
| pack-priv final CacheLoader<K, V> cacheLoader | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| CaffeinatedLoader | back to summary |
|---|---|
| pack-priv CaffeinatedLoader(CacheLoader<K, V> cacheLoader) | |
| asyncReload | back to summary |
|---|---|
| public CompletableFuture Overrides default com. Doc from com. Asynchronously computes or retrieves a replacement value corresponding to an already-cached
Warning loading must not attempt to update any mappings of this cache directly or block waiting for other cache operations to complete. Note all exceptions thrown by this method will be logged and then swallowed.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Map | loadAll(Set<? extends K>
the unique, non-null keys whose values should be loaded keys)Overrides default com. keys.
|
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| ExternalBulkLoader | back to summary |
|---|---|
| pack-priv ExternalBulkLoader(CacheLoader<K, V> cacheLoader) | |
| loadAll | back to summary |
|---|---|
| public Map Overrides default com. Doc from com. Computes or retrieves the values corresponding to
If the returned map doesn't contain all requested
This method should be overridden when bulk retrieval is significantly more efficient than many
individual lookups. Note that Warning loading must not attempt to update any mappings of this cache directly. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public V | load(K
the non-null key whose value should be loaded key)Implements com. key.
|
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| ExternalSingleLoader | back to summary |
|---|---|
| pack-priv ExternalSingleLoader(CacheLoader<K, V> cacheLoader) | |
| load | back to summary |
|---|---|
| public V load(K key) throws Exception Implements com. Doc from com. Computes or retrieves the value corresponding to Warning loading must not attempt to update any mappings of this cache directly. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final CompletableFuture |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | onFailure(Throwable t)
Implements com. Future computation fails or is canceled.
|
| public void | onSuccess(@Nullable V value)
Implements com. Future computation when it is successful.
|
| future | back to summary |
|---|---|
| pack-priv final CompletableFuture<V> future | |
| FutureCompleter | back to summary |
|---|---|
| pack-priv FutureCompleter(CompletableFuture<V> future) | |
| onFailure | back to summary |
|---|---|
| public void onFailure(Throwable t) Implements com. Doc from com. Invoked when a If the future's
| |
| onSuccess | back to summary |
|---|---|
| public void onSuccess(@Nullable V value) Implements com. Doc from com. Invoked with the result of the
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Map | loadAll(Set<? extends K>
the unique, non-null keys whose values should be loaded keys)Overrides default com. keys.
|
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| InternalBulkLoader | back to summary |
|---|---|
| pack-priv InternalBulkLoader(CacheLoader<K, V> cacheLoader) | |
| loadAll | back to summary |
|---|---|
| public Map Overrides default com. Doc from com. Computes or retrieves the values corresponding to
If the returned map doesn't contain all requested
This method should be overridden when bulk retrieval is significantly more efficient than many
individual lookups. Note that Warning loading must not attempt to update any mappings of this cache directly. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public V | load(K
the non-null key whose value should be loaded key)Implements com. key.
|
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| InternalSingleLoader | back to summary |
|---|---|
| pack-priv InternalSingleLoader(CacheLoader<K, V> cacheLoader) | |
| load | back to summary |
|---|---|
| public V load(K key) Implements com. Doc from com. Computes or retrieves the value corresponding to Warning loading must not attempt to update any mappings of this cache directly.
| |