ConcurrentMap for use with skeletal implementations.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public default @Nullable V | compute(K
key with which the specified value is to be associated key, BiFunction<? super K, ? super V, ? extends V> the remapping function to compute a value remappingFunction)Overrides default java. null if there is no current mapping).
|
| public @Nullable V | compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, @Nullable Expiry<? super K, ? super V> expiry, boolean recordLoad, boolean recordLoadFailure)
|
| public default @Nullable V | computeIfAbsent(K
key with which the specified value is to be associated key, Function<? super K, ? extends V> the mapping function to compute a value mappingFunction)Overrides default java. null), attempts to compute its value using the given mapping
function and enters it into this map unless null.
|
| public @Nullable V | computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction, boolean recordStats, boolean recordLoad)
|
| public long | |
| public Executor | |
| public @Nullable Expiry | |
| public Map | |
| public @Nullable V | |
| public @Nullable V | |
| public default void | |
| public boolean | |
| public boolean | isPendingEviction(K key)
Returns whether an absent entry has expired or has been reference collected but has not yet been removed from the cache. |
| public boolean | |
| public default void | notifyOnReplace(K key, V oldValue, V newValue)
Notify the removal listener of a replacement if the value reference was changed. |
| public void | notifyRemoval(@Nullable K key, @Nullable V value, RemovalCause cause)
Asynchronously sends a removal notification to the listener. |
| public Object | |
| public ConcurrentMap | |
| public boolean | replace(K key, V oldValue, V newValue, boolean shouldDiscardRefresh)
|
| public default <T, R> Function | statsAware(Function<? super T, ? extends R> mappingFunction, boolean recordLoad)
Decorates the remapping function to record statistics if enabled. |
| public default <T, U, R> BiFunction | statsAware(BiFunction<? super T, ? super U, ? extends R> remappingFunction)
Decorates the remapping function to record statistics if enabled. |
| public default <T, U, R> BiFunction | statsAware(BiFunction<? super T, ? super U, ? extends R> remappingFunction, boolean recordLoad, boolean recordLoadFailure)
Decorates the remapping function to record statistics if enabled. |
| public StatsCounter | |
| public Ticker |
| cleanUp | back to summary |
|---|---|
| public void cleanUp() See | |
| compute | back to summary |
|---|---|
| public default @Nullable V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) Overrides default java. Doc from java. Attempts to compute a mapping for the specified key and its current
mapped value (or
(Method merge() is often simpler to use for such purposes.)
If the remapping function returns The remapping function should not modify this map during computation.
| |
| compute | back to summary |
|---|---|
| public @Nullable V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, @Nullable Expiry<? super K, ? super V> expiry, boolean recordLoad, boolean recordLoadFailure) See | |
| computeIfAbsent | back to summary |
|---|---|
| public default @Nullable V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) Overrides default java. Doc from java. If the specified key is not already associated with a value (or is mapped
to If the mapping function returns
Or to implement a multi-value map,
The mapping function should not modify this map during computation.
| |
| computeIfAbsent | back to summary |
|---|---|
| public @Nullable V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction, boolean recordStats, boolean recordLoad) See | |
| estimatedSize | back to summary |
|---|---|
| public long estimatedSize() | |
| executor | back to summary |
|---|---|
| public Executor executor() Returns the | |
| expiry | back to summary |
|---|---|
| public @Nullable Expiry Returns the | |
| getAllPresent | back to summary |
|---|---|
| public Map See | |
| getIfPresent | back to summary |
|---|---|
| public @Nullable V getIfPresent(K key, boolean recordStats) See | |
| getIfPresentQuietly | back to summary |
|---|---|
| public @Nullable V getIfPresentQuietly(K key) See | |
| invalidateAll | back to summary |
|---|---|
| public default void invalidateAll(Iterable<?> keys) | |
| isAsync | back to summary |
|---|---|
| public boolean isAsync() Returns whether this cache is asynchronous. | |
| isPendingEviction | back to summary |
|---|---|
| public boolean isPendingEviction(K key) Returns whether an absent entry has expired or has been reference collected but has not yet been removed from the cache. | |
| isRecordingStats | back to summary |
|---|---|
| public boolean isRecordingStats() Returns whether this cache has statistics enabled. | |
| notifyOnReplace | back to summary |
|---|---|
| public default void notifyOnReplace(K key, V oldValue, V newValue) Notify the removal listener of a replacement if the value reference was changed.
| |
| notifyRemoval | back to summary |
|---|---|
| public void notifyRemoval(@Nullable K key, @Nullable V value, RemovalCause cause) Asynchronously sends a removal notification to the listener. | |
| referenceKey | back to summary |
|---|---|
| public Object referenceKey(K key) Returns the reference key. | |
| refreshes | back to summary |
|---|---|
| public ConcurrentMap Returns the map of in-flight refresh operations. | |
| replace | back to summary |
|---|---|
| public boolean replace(K key, V oldValue, V newValue, boolean shouldDiscardRefresh) See | |
| statsAware | back to summary |
|---|---|
| public default <T, R> Function Decorates the remapping function to record statistics if enabled. | |
| statsAware | back to summary |
|---|---|
| public default <T, U, R> BiFunction Decorates the remapping function to record statistics if enabled. | |
| statsAware | back to summary |
|---|---|
| public default <T, U, R> BiFunction Decorates the remapping function to record statistics if enabled. | |
| statsCounter | back to summary |
|---|---|
| public StatsCounter statsCounter() Returns the | |
| statsTicker | back to summary |
|---|---|
| public Ticker statsTicker() Returns the | |