A B C D E F G H I L M N O P R S T V W Y
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- ageOf(K) - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedExpiration
-
Returns the age of the entry based on the expiration policy.
- ageOf(K) - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedRefresh
-
Returns the age of the entry based on the refresh policy.
- ageOf(K, TimeUnit) - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedExpiration
-
Returns the age of the entry based on the expiration policy.
- ageOf(K, TimeUnit) - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedRefresh
-
Returns the age of the entry based on the refresh policy.
- asMap() - Method in interface com.github.benmanes.caffeine.cache.AsyncCache
-
Returns a view of the entries stored in this cache as a thread-safe map.
- asMap() - Method in interface com.github.benmanes.caffeine.cache.Cache
-
Returns a view of the entries stored in this cache as a thread-safe map.
- AsyncCache<K,V> - Interface in com.github.benmanes.caffeine.cache
-
A semi-persistent mapping from keys to values.
- AsyncCacheLoader<K,V> - Interface in com.github.benmanes.caffeine.cache
-
Computes or retrieves values asynchronously, based on a key, for use in populating a
AsyncLoadingCache
. - asyncLoad(K, Executor) - Method in interface com.github.benmanes.caffeine.cache.AsyncCacheLoader
-
Asynchronously computes or retrieves the value corresponding to
key
. - asyncLoad(K, Executor) - Method in interface com.github.benmanes.caffeine.cache.CacheLoader
-
Asynchronously computes or retrieves the value corresponding to
key
. - asyncLoadAll(Set<? extends K>, Executor) - Method in interface com.github.benmanes.caffeine.cache.AsyncCacheLoader
-
Asynchronously computes or retrieves the values corresponding to
keys
. - asyncLoadAll(Set<? extends K>, Executor) - Method in interface com.github.benmanes.caffeine.cache.CacheLoader
-
Asynchronously computes or retrieves the values corresponding to
keys
. - AsyncLoadingCache<K,V> - Interface in com.github.benmanes.caffeine.cache
-
A semi-persistent mapping from keys to values.
- asyncReload(K, V, Executor) - Method in interface com.github.benmanes.caffeine.cache.AsyncCacheLoader
-
Asynchronously computes or retrieves a replacement value corresponding to an already-cached
key
. - asyncReload(K, V, Executor) - Method in interface com.github.benmanes.caffeine.cache.CacheLoader
-
Asynchronously computes or retrieves a replacement value corresponding to an already-cached
key
. - averageLoadPenalty() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns the average number of nanoseconds spent loading new values.
B
- boundedWeigher(Weigher<K, V>) - Static method in interface com.github.benmanes.caffeine.cache.Weigher
-
Returns a weigher that enforces that the weight is non-negative.
- build() - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Builds a cache which does not automatically load values when keys are requested unless a mapping function is provided.
- build(CacheLoader<? super K1, V1>) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Builds a cache, which either returns an already-loaded value for a given key or atomically computes or retrieves it using the supplied
CacheLoader
. - buildAsync() - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Builds a cache which does not automatically load values when keys are requested unless a mapping function is provided.
- buildAsync(AsyncCacheLoader<? super K1, V1>) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Builds a cache, which either returns a
CompletableFuture
already loaded or currently computing the value for a given key, or atomically computes the value asynchronously through a supplied mapping function or the suppliedAsyncCacheLoader
. - buildAsync(CacheLoader<? super K1, V1>) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Builds a cache, which either returns a
CompletableFuture
already loaded or currently computing the value for a given key, or atomically computes the value asynchronously through a supplied mapping function or the suppliedCacheLoader
. - bulk(BiFunction<? super Set<? extends K>, ? super Executor, ? extends CompletableFuture<? extends Map<? extends K, ? extends V>>>) - Static method in interface com.github.benmanes.caffeine.cache.AsyncCacheLoader
-
Returns an asynchronous cache loader that delegates to the supplied mapping function for retrieving the values.
- bulk(Function<? super Set<? extends K>, ? extends Map<? extends K, ? extends V>>) - Static method in interface com.github.benmanes.caffeine.cache.AsyncCacheLoader
-
Returns an asynchronous cache loader that delegates to the supplied mapping function for retrieving the values.
- bulk(Function<? super Set<? extends K>, ? extends Map<? extends K, ? extends V>>) - Static method in interface com.github.benmanes.caffeine.cache.CacheLoader
-
Returns a cache loader that delegates to the supplied mapping function for retrieving the values.
C
- Cache<K,V> - Interface in com.github.benmanes.caffeine.cache
-
A semi-persistent mapping from keys to values.
- CacheLoader<K,V> - Interface in com.github.benmanes.caffeine.cache
-
Computes or retrieves values, based on a key, for use in populating a
LoadingCache
orAsyncLoadingCache
. - CacheStats - Class in com.github.benmanes.caffeine.cache.stats
-
Statistics about the performance of a
Cache
. - Caffeine<K,V> - Class in com.github.benmanes.caffeine.cache
-
A builder of
Cache
,LoadingCache
,AsyncCache
, andAsyncLoadingCache
instances having a combination of the following features: automatic loading of entries into the cache, optionally asynchronously size-based eviction when a maximum is exceeded based on frequency and recency time-based expiration of entries, measured since last access or last write asynchronously refresh when the first stale request for an entry occurs keys automatically wrapped in weak references values automatically wrapped in weak or soft references writes propagated to an external resource notification of evicted (or otherwise removed) entries accumulation of cache access statistics - CaffeineSpec - Class in com.github.benmanes.caffeine.cache
-
A specification of a
Caffeine
builder configuration. - cleanUp() - Method in interface com.github.benmanes.caffeine.cache.Cache
-
Performs any pending maintenance operations needed by the cache.
- coldest(@org.checkerframework.checker.index.qual.NonNegative int) - Method in interface com.github.benmanes.caffeine.cache.Policy.Eviction
-
Returns an unmodifiable snapshot
Map
view of the cache with ordered traversal. - coldest(Function<Stream<Policy.CacheEntry<K, V>>, T>) - Method in interface com.github.benmanes.caffeine.cache.Policy.Eviction
-
Returns the computed result from the ordered traversal of the cache entries.
- coldestWeighted(@org.checkerframework.checker.index.qual.NonNegative long) - Method in interface com.github.benmanes.caffeine.cache.Policy.Eviction
-
Returns an unmodifiable snapshot
Map
view of the cache with ordered traversal. - COLLECTED - com.github.benmanes.caffeine.cache.RemovalCause
-
The entry was removed automatically because its key or value was garbage-collected.
- com.github.benmanes.caffeine - module com.github.benmanes.caffeine
- com.github.benmanes.caffeine.cache - package com.github.benmanes.caffeine.cache
-
This package contains in-memory caching functionality.
- com.github.benmanes.caffeine.cache.stats - package com.github.benmanes.caffeine.cache.stats
-
This package contains caching statistic utilities.
- compute(K, BiFunction<? super K, ? super V, ? extends V>, Duration) - Method in interface com.github.benmanes.caffeine.cache.Policy.VarExpiration
-
Attempts to compute a mapping for the specified key and its current mapped value (or
null
if there is no current mapping). - ConcurrentStatsCounter - Class in com.github.benmanes.caffeine.cache.stats
-
A thread-safe
StatsCounter
implementation for use byCache
implementors. - ConcurrentStatsCounter() - Constructor for class com.github.benmanes.caffeine.cache.stats.ConcurrentStatsCounter
-
Constructs an instance with all counts initialized to zero.
D
- disabledScheduler() - Static method in interface com.github.benmanes.caffeine.cache.Scheduler
-
Returns a scheduler that always returns a successfully completed future.
- disabledStatsCounter() - Static method in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
-
Returns an accumulator that does not record any cache events.
- disabledTicker() - Static method in interface com.github.benmanes.caffeine.cache.Ticker
-
Returns a ticker that always returns
0
.
E
- empty() - Static method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns a statistics instance where no cache events have been recorded.
- equals(Object) - Method in class com.github.benmanes.caffeine.cache.CaffeineSpec
- equals(Object) - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
- estimatedSize() - Method in interface com.github.benmanes.caffeine.cache.Cache
-
Returns the approximate number of entries in this cache.
- eviction() - Method in interface com.github.benmanes.caffeine.cache.Policy
-
Returns access to perform operations based on the maximum size or maximum weight eviction policy.
- evictionCount() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns the number of times an entry has been evicted.
- evictionListener(RemovalListener<? super K1, ? super V1>) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies a listener instance that caches should notify each time an entry is evicted.
- evictionWeight() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns the sum of weights of evicted entries.
- executor(Executor) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies the executor to use when running asynchronous tasks.
- expireAfter(Expiry<? super K1, ? super V1>) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies that each entry should be automatically removed from the cache once a duration has elapsed after the entry's creation, the most recent replacement of its value, or its last read.
- expireAfterAccess() - Method in interface com.github.benmanes.caffeine.cache.Policy
-
Returns access to perform operations based on the time-to-idle expiration policy.
- expireAfterAccess(@org.checkerframework.checker.index.qual.NonNegative long, TimeUnit) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, the most recent replacement of its value, or its last read.
- expireAfterAccess(Duration) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, the most recent replacement of its value, or its last access.
- expireAfterCreate(K, V, long) - Method in interface com.github.benmanes.caffeine.cache.Expiry
-
Specifies that the entry should be automatically removed from the cache once the duration has elapsed after the entry's creation.
- expireAfterRead(K, V, long, @org.checkerframework.checker.index.qual.NonNegative long) - Method in interface com.github.benmanes.caffeine.cache.Expiry
-
Specifies that the entry should be automatically removed from the cache once the duration has elapsed after its last read.
- expireAfterUpdate(K, V, long, @org.checkerframework.checker.index.qual.NonNegative long) - Method in interface com.github.benmanes.caffeine.cache.Expiry
-
Specifies that the entry should be automatically removed from the cache once the duration has elapsed after the replacement of its value.
- expireAfterWrite() - Method in interface com.github.benmanes.caffeine.cache.Policy
-
Returns access to perform operations based on the time-to-live expiration policy.
- expireAfterWrite(@org.checkerframework.checker.index.qual.NonNegative long, TimeUnit) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.
- expireAfterWrite(Duration) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.
- EXPIRED - com.github.benmanes.caffeine.cache.RemovalCause
-
The entry's expiration timestamp has passed.
- expiresAfter() - Method in interface com.github.benmanes.caffeine.cache.Policy.CacheEntry
-
Returns the duration between
Policy.CacheEntry.expiresAt()
andPolicy.CacheEntry.snapshotAt()
. - expiresAt() - Method in interface com.github.benmanes.caffeine.cache.Policy.CacheEntry
-
Returns the
Ticker.read()
ticks for when this entry expires. - expireVariably() - Method in interface com.github.benmanes.caffeine.cache.Policy
-
Returns access to perform operations based on the variable expiration policy.
- Expiry<K,V> - Interface in com.github.benmanes.caffeine.cache
-
Calculates when cache entries expire.
- EXPLICIT - com.github.benmanes.caffeine.cache.RemovalCause
-
The entry was manually removed by the user.
F
- forScheduledExecutorService(ScheduledExecutorService) - Static method in interface com.github.benmanes.caffeine.cache.Scheduler
-
Returns a scheduler that delegates to the a
ScheduledExecutorService
. - from(CaffeineSpec) - Static method in class com.github.benmanes.caffeine.cache.Caffeine
-
Constructs a new
Caffeine
instance with the settings specified inspec
. - from(String) - Static method in class com.github.benmanes.caffeine.cache.Caffeine
-
Constructs a new
Caffeine
instance with the settings specified inspec
.
G
- get(K) - Method in interface com.github.benmanes.caffeine.cache.AsyncLoadingCache
-
Returns the future associated with
key
in this cache, obtaining that value fromAsyncCacheLoader.asyncLoad(K, java.util.concurrent.Executor)
if necessary. - get(K) - Method in interface com.github.benmanes.caffeine.cache.LoadingCache
-
Returns the value associated with the
key
in this cache, obtaining that value fromCacheLoader.load(Object)
if necessary. - get(K, BiFunction<? super K, ? super Executor, ? extends CompletableFuture<? extends V>>) - Method in interface com.github.benmanes.caffeine.cache.AsyncCache
-
Returns the future associated with
key
in this cache, obtaining that value frommappingFunction
if necessary. - get(K, Function<? super K, ? extends V>) - Method in interface com.github.benmanes.caffeine.cache.Cache
-
Returns the value associated with the
key
in this cache, obtaining that value from themappingFunction
if necessary. - get(K, Function<? super K, ? extends V>) - Method in interface com.github.benmanes.caffeine.cache.AsyncCache
-
Returns the future associated with
key
in this cache, obtaining that value frommappingFunction
if necessary. - getAll(Iterable<? extends K>) - Method in interface com.github.benmanes.caffeine.cache.AsyncLoadingCache
-
Returns the future of a map of the values associated with
keys
, creating or retrieving those values if necessary. - getAll(Iterable<? extends K>) - Method in interface com.github.benmanes.caffeine.cache.LoadingCache
-
Returns a map of the values associated with the
keys
, creating or retrieving those values if necessary. - getAll(Iterable<? extends K>, BiFunction<? super Set<? extends K>, ? super Executor, ? extends CompletableFuture<? extends Map<? extends K, ? extends V>>>) - Method in interface com.github.benmanes.caffeine.cache.AsyncCache
-
Returns the future of a map of the values associated with
keys
, creating or retrieving those values if necessary. - getAll(Iterable<? extends K>, Function<? super Set<? extends K>, ? extends Map<? extends K, ? extends V>>) - Method in interface com.github.benmanes.caffeine.cache.AsyncCache
-
Returns the future of a map of the values associated with
keys
, creating or retrieving those values if necessary. - getAll(Iterable<? extends K>, Function<? super Set<? extends K>, ? extends Map<? extends K, ? extends V>>) - Method in interface com.github.benmanes.caffeine.cache.Cache
-
Returns a map of the values associated with the
keys
, creating or retrieving those values if necessary. - getAllPresent(Iterable<? extends K>) - Method in interface com.github.benmanes.caffeine.cache.Cache
-
Returns a map of the values associated with the
keys
in this cache. - getEntryIfPresentQuietly(K) - Method in interface com.github.benmanes.caffeine.cache.Policy
-
Returns the cache entry associated with the
key
in this cache, ornull
if there is no cached value for thekey
. - getExpiresAfter() - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedExpiration
-
Returns the fixed duration used to determine if an entry should be automatically removed due to elapsing this time bound.
- getExpiresAfter(TimeUnit) - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedExpiration
-
Returns the fixed duration used to determine if an entry should be automatically removed due to elapsing this time bound.
- getExpiresAfter(K) - Method in interface com.github.benmanes.caffeine.cache.Policy.VarExpiration
-
Returns the duration until the entry should be automatically removed.
- getExpiresAfter(K, TimeUnit) - Method in interface com.github.benmanes.caffeine.cache.Policy.VarExpiration
-
Returns the duration until the entry should be automatically removed.
- getIfPresent(K) - Method in interface com.github.benmanes.caffeine.cache.AsyncCache
-
Returns the future associated with
key
in this cache, ornull
if there is no cached future forkey
. - getIfPresent(K) - Method in interface com.github.benmanes.caffeine.cache.Cache
-
Returns the value associated with the
key
in this cache, ornull
if there is no cached value for thekey
. - getIfPresentQuietly(K) - Method in interface com.github.benmanes.caffeine.cache.Policy
-
Returns the value associated with the
key
in this cache, ornull
if there is no cached value for thekey
. - getMaximum() - Method in interface com.github.benmanes.caffeine.cache.Policy.Eviction
-
Returns the maximum total weighted or unweighted size of this cache, depending on how the cache was constructed.
- getRefreshesAfter() - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedRefresh
-
Returns the fixed duration used to determine if an entry should be eligible for reloading due to elapsing this time bound.
- getRefreshesAfter(TimeUnit) - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedRefresh
-
Returns the fixed duration used to determine if an entry should be eligible for reloading due to elapsing this time bound.
- guardedScheduler(Scheduler) - Static method in interface com.github.benmanes.caffeine.cache.Scheduler
-
Returns a scheduler that suppresses and logs any exception thrown by the delegate
scheduler
. - guardedStatsCounter(StatsCounter) - Static method in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
-
Returns an accumulator that suppresses and logs any exception thrown by the delegate
statsCounter
.
H
- hashCode() - Method in class com.github.benmanes.caffeine.cache.CaffeineSpec
- hashCode() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
- hitCount() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns the number of times
Cache
lookup methods have returned a cached value. - hitRate() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns the ratio of cache requests which were hits.
- hottest(@org.checkerframework.checker.index.qual.NonNegative int) - Method in interface com.github.benmanes.caffeine.cache.Policy.Eviction
-
Returns an unmodifiable snapshot
Map
view of the cache with ordered traversal. - hottest(Function<Stream<Policy.CacheEntry<K, V>>, T>) - Method in interface com.github.benmanes.caffeine.cache.Policy.Eviction
-
Returns the computed result from the ordered traversal of the cache entries.
- hottestWeighted(@org.checkerframework.checker.index.qual.NonNegative long) - Method in interface com.github.benmanes.caffeine.cache.Policy.Eviction
-
Returns an unmodifiable snapshot
Map
view of the cache with ordered traversal.
I
- incrementBy(StatsCounter) - Method in class com.github.benmanes.caffeine.cache.stats.ConcurrentStatsCounter
-
Increments all counters by the values in
other
. - initialCapacity(@org.checkerframework.checker.index.qual.NonNegative int) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Sets the minimum total size for the internal data structures.
- invalidate(K) - Method in interface com.github.benmanes.caffeine.cache.Cache
-
Discards any cached value for the
key
. - invalidateAll() - Method in interface com.github.benmanes.caffeine.cache.Cache
-
Discards all entries in the cache.
- invalidateAll(Iterable<? extends K>) - Method in interface com.github.benmanes.caffeine.cache.Cache
-
Discards any cached values for the
keys
. - isRecordingStats() - Method in interface com.github.benmanes.caffeine.cache.Policy
-
Returns whether the cache statistics are being accumulated.
- isWeighted() - Method in interface com.github.benmanes.caffeine.cache.Policy.Eviction
-
Returns whether the cache is bounded by a maximum size or maximum weight.
L
- load(K) - Method in interface com.github.benmanes.caffeine.cache.CacheLoader
-
Computes or retrieves the value corresponding to
key
. - loadAll(Set<? extends K>) - Method in interface com.github.benmanes.caffeine.cache.CacheLoader
-
Computes or retrieves the values corresponding to
keys
. - loadCount() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns the total number of times that
Cache
lookup methods attempted to load new values. - loadFailureCount() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns the number of times
Cache
lookup methods failed to load a new value, either because no value was found or an exception was thrown while loading. - loadFailureRate() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns the ratio of cache loading attempts which threw exceptions.
- LoadingCache<K,V> - Interface in com.github.benmanes.caffeine.cache
-
A semi-persistent mapping from keys to values.
- loadSuccessCount() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns the number of times
Cache
lookup methods have successfully loaded a new value.
M
- maximumSize(@org.checkerframework.checker.index.qual.NonNegative long) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies the maximum number of entries the cache may contain.
- maximumWeight(@org.checkerframework.checker.index.qual.NonNegative long) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies the maximum weight of entries the cache may contain.
- minus(CacheStats) - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns a new
CacheStats
representing the difference between thisCacheStats
andother
. - missCount() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns the number of times
Cache
lookup methods have returned an uncached (newly loaded) value, or null. - missRate() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns the ratio of cache requests which were misses.
N
- newBuilder() - Static method in class com.github.benmanes.caffeine.cache.Caffeine
-
Constructs a new
Caffeine
instance with default settings, including strong keys, strong values, and no automatic eviction of any kind.
O
- of(@org.checkerframework.checker.index.qual.NonNegative long, @org.checkerframework.checker.index.qual.NonNegative long, @org.checkerframework.checker.index.qual.NonNegative long, @org.checkerframework.checker.index.qual.NonNegative long, @org.checkerframework.checker.index.qual.NonNegative long, @org.checkerframework.checker.index.qual.NonNegative long, @org.checkerframework.checker.index.qual.NonNegative long) - Static method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns a
CacheStats
representing the specified statistics. - oldest(@org.checkerframework.checker.index.qual.NonNegative int) - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedExpiration
-
Returns an unmodifiable snapshot
Map
view of the cache with ordered traversal. - oldest(@org.checkerframework.checker.index.qual.NonNegative int) - Method in interface com.github.benmanes.caffeine.cache.Policy.VarExpiration
-
Returns an unmodifiable snapshot
Map
view of the cache with ordered traversal. - oldest(Function<Stream<Policy.CacheEntry<K, V>>, T>) - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedExpiration
-
Returns the computed result from the ordered traversal of the cache entries.
- oldest(Function<Stream<Policy.CacheEntry<K, V>>, T>) - Method in interface com.github.benmanes.caffeine.cache.Policy.VarExpiration
-
Returns the computed result from the ordered traversal of the cache entries.
- onRemoval(K, V, RemovalCause) - Method in interface com.github.benmanes.caffeine.cache.RemovalListener
-
Notifies the listener that a removal occurred at some point in the past.
P
- parse(String) - Static method in class com.github.benmanes.caffeine.cache.CaffeineSpec
-
Creates a CaffeineSpec from a string.
- plus(CacheStats) - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns a new
CacheStats
representing the sum of thisCacheStats
andother
. - policy() - Method in interface com.github.benmanes.caffeine.cache.Cache
-
Returns access to inspect and perform low-level operations on this cache based on its runtime characteristics.
- Policy<K,V> - Interface in com.github.benmanes.caffeine.cache
-
An access point for inspecting and performing low-level operations based on the cache's runtime characteristics.
- Policy.CacheEntry<K,V> - Interface in com.github.benmanes.caffeine.cache
-
A key-value pair that may include policy metadata for the cached entry.
- Policy.Eviction<K,V> - Interface in com.github.benmanes.caffeine.cache
-
The low-level operations for a cache with a size-based eviction policy.
- Policy.FixedExpiration<K,V> - Interface in com.github.benmanes.caffeine.cache
-
The low-level operations for a cache with a fixed expiration policy.
- Policy.FixedRefresh<K,V> - Interface in com.github.benmanes.caffeine.cache
-
The low-level operations for a cache with a fixed refresh policy.
- Policy.VarExpiration<K,V> - Interface in com.github.benmanes.caffeine.cache
-
The low-level operations for a cache with a variable expiration policy.
- put(K, CompletableFuture<? extends V>) - Method in interface com.github.benmanes.caffeine.cache.AsyncCache
-
Associates
value
withkey
in this cache. - put(K, V) - Method in interface com.github.benmanes.caffeine.cache.Cache
-
Associates the
value
with thekey
in this cache. - put(K, V, @org.checkerframework.checker.index.qual.NonNegative long, TimeUnit) - Method in interface com.github.benmanes.caffeine.cache.Policy.VarExpiration
-
Associates the
value
with thekey
in this cache. - put(K, V, Duration) - Method in interface com.github.benmanes.caffeine.cache.Policy.VarExpiration
-
Associates the
value
with thekey
in this cache. - putAll(Map<? extends K, ? extends V>) - Method in interface com.github.benmanes.caffeine.cache.Cache
-
Copies all of the mappings from the specified map to the cache.
- putIfAbsent(K, V, @org.checkerframework.checker.index.qual.NonNegative long, TimeUnit) - Method in interface com.github.benmanes.caffeine.cache.Policy.VarExpiration
-
Associates the
value
with thekey
in this cache if the specified key is not already associated with a value. - putIfAbsent(K, V, Duration) - Method in interface com.github.benmanes.caffeine.cache.Policy.VarExpiration
-
Associates the
value
with thekey
in this cache if the specified key is not already associated with a value.
R
- read() - Method in interface com.github.benmanes.caffeine.cache.Ticker
-
Returns the number of nanoseconds elapsed since this ticker's fixed point of reference.
- recordEviction(@org.checkerframework.checker.index.qual.NonNegative int, RemovalCause) - Method in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
-
Records the eviction of an entry from the cache.
- recordEviction(int, RemovalCause) - Method in class com.github.benmanes.caffeine.cache.stats.ConcurrentStatsCounter
- recordHits(@org.checkerframework.checker.index.qual.NonNegative int) - Method in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
-
Records cache hits.
- recordHits(int) - Method in class com.github.benmanes.caffeine.cache.stats.ConcurrentStatsCounter
- recordLoadFailure(@org.checkerframework.checker.index.qual.NonNegative long) - Method in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
-
Records the failed load of a new entry.
- recordLoadFailure(long) - Method in class com.github.benmanes.caffeine.cache.stats.ConcurrentStatsCounter
- recordLoadSuccess(@org.checkerframework.checker.index.qual.NonNegative long) - Method in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
-
Records the successful load of a new entry.
- recordLoadSuccess(long) - Method in class com.github.benmanes.caffeine.cache.stats.ConcurrentStatsCounter
- recordMisses(@org.checkerframework.checker.index.qual.NonNegative int) - Method in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
-
Records cache misses.
- recordMisses(int) - Method in class com.github.benmanes.caffeine.cache.stats.ConcurrentStatsCounter
- recordStats() - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Enables the accumulation of
CacheStats
during the operation of the cache. - recordStats(Supplier<? extends StatsCounter>) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Enables the accumulation of
CacheStats
during the operation of the cache. - refresh(K) - Method in interface com.github.benmanes.caffeine.cache.LoadingCache
-
Loads a new value for the
key
, asynchronously. - refreshableAfter() - Method in interface com.github.benmanes.caffeine.cache.Policy.CacheEntry
-
Returns the duration between
Policy.CacheEntry.refreshableAt()
andPolicy.CacheEntry.snapshotAt()
. - refreshableAt() - Method in interface com.github.benmanes.caffeine.cache.Policy.CacheEntry
-
Returns the
Ticker.read()
ticks for when this entry becomes refreshable. - refreshAfterWrite() - Method in interface com.github.benmanes.caffeine.cache.Policy
-
Returns access to perform operations based on the time-to-live refresh policy.
- refreshAfterWrite(@org.checkerframework.checker.index.qual.NonNegative long, TimeUnit) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies that active entries are eligible for automatic refresh once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.
- refreshAfterWrite(Duration) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies that active entries are eligible for automatic refresh once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.
- refreshAll(Iterable<? extends K>) - Method in interface com.github.benmanes.caffeine.cache.LoadingCache
-
Loads a new value for each
key
, asynchronously. - refreshes() - Method in interface com.github.benmanes.caffeine.cache.Policy
-
Returns an unmodifiable snapshot
Map
view of the in-flight refresh operations. - reload(K, V) - Method in interface com.github.benmanes.caffeine.cache.CacheLoader
-
Computes or retrieves a replacement value corresponding to an already-cached
key
. - RemovalCause - Enum in com.github.benmanes.caffeine.cache
-
The reason why a cached entry was removed.
- removalListener(RemovalListener<? super K1, ? super V1>) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies a listener instance that caches should notify each time an entry is removed for any reason.
- RemovalListener<K,V> - Interface in com.github.benmanes.caffeine.cache
-
An object that can receive a notification when an entry is removed from a cache.
- REPLACED - com.github.benmanes.caffeine.cache.RemovalCause
-
The entry itself was not actually removed, but its value was replaced by the user.
- requestCount() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns the number of times
Cache
lookup methods have returned either a cached or uncached value.
S
- schedule(Executor, Runnable, long, TimeUnit) - Method in interface com.github.benmanes.caffeine.cache.Scheduler
-
Returns a future that will submit the task to the given executor after the given delay.
- scheduler(Scheduler) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies the scheduler to use when scheduling routine maintenance based on an expiration event.
- Scheduler - Interface in com.github.benmanes.caffeine.cache
-
A scheduler that submits a task to an executor after a given delay.
- setExpiresAfter(@org.checkerframework.checker.index.qual.NonNegative long, TimeUnit) - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedExpiration
-
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed.
- setExpiresAfter(Duration) - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedExpiration
-
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed.
- setExpiresAfter(K, @org.checkerframework.checker.index.qual.NonNegative long, TimeUnit) - Method in interface com.github.benmanes.caffeine.cache.Policy.VarExpiration
-
Specifies that the entry should be automatically removed from the cache once the duration has elapsed.
- setExpiresAfter(K, Duration) - Method in interface com.github.benmanes.caffeine.cache.Policy.VarExpiration
-
Specifies that the entry should be automatically removed from the cache once the duration has elapsed.
- setMaximum(@org.checkerframework.checker.index.qual.NonNegative long) - Method in interface com.github.benmanes.caffeine.cache.Policy.Eviction
-
Specifies the maximum total size of this cache.
- setRefreshesAfter(@org.checkerframework.checker.index.qual.NonNegative long, TimeUnit) - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedRefresh
-
Specifies that each entry should be eligible for reloading once a fixed duration has elapsed.
- setRefreshesAfter(Duration) - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedRefresh
-
Specifies that each entry should be eligible for reloading once a fixed duration has elapsed.
- singletonWeigher() - Static method in interface com.github.benmanes.caffeine.cache.Weigher
-
Returns a weigher where an entry has a weight of
1
. - SIZE - com.github.benmanes.caffeine.cache.RemovalCause
-
The entry was evicted due to size constraints.
- snapshot() - Method in class com.github.benmanes.caffeine.cache.stats.ConcurrentStatsCounter
- snapshot() - Method in interface com.github.benmanes.caffeine.cache.stats.StatsCounter
-
Returns a snapshot of this counter's values.
- snapshotAt() - Method in interface com.github.benmanes.caffeine.cache.Policy.CacheEntry
-
Returns the
Ticker.read()
ticks for when this snapshot of the entry was taken. - softValues() - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies that each value (not key) stored in the cache should be wrapped in a
SoftReference
(by default, strong references are used). - stats() - Method in interface com.github.benmanes.caffeine.cache.Cache
-
Returns a current snapshot of this cache's cumulative statistics.
- StatsCounter - Interface in com.github.benmanes.caffeine.cache.stats
-
Accumulates statistics during the operation of a
Cache
for presentation byCache.stats()
. - synchronous() - Method in interface com.github.benmanes.caffeine.cache.AsyncCache
-
Returns a view of the entries stored in this cache as a synchronous
Cache
. - synchronous() - Method in interface com.github.benmanes.caffeine.cache.AsyncLoadingCache
-
Returns a view of the entries stored in this cache as a synchronous
LoadingCache
. - systemScheduler() - Static method in interface com.github.benmanes.caffeine.cache.Scheduler
-
Returns a scheduler that uses the system-wide scheduling thread by using
CompletableFuture.delayedExecutor(long, java.util.concurrent.TimeUnit, java.util.concurrent.Executor)
. - systemTicker() - Static method in interface com.github.benmanes.caffeine.cache.Ticker
-
Returns a ticker that reads the current time using
System.nanoTime()
.
T
- ticker(Ticker) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies a nanosecond-precision time source for use in determining when entries should be expired or refreshed.
- Ticker - Interface in com.github.benmanes.caffeine.cache
-
A time source that returns a time value representing the number of nanoseconds elapsed since some fixed but arbitrary point in time.
- toParsableString() - Method in class com.github.benmanes.caffeine.cache.CaffeineSpec
-
Returns a string that can be used to parse an equivalent
CaffeineSpec
. - toString() - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Returns a string representation for this Caffeine instance.
- toString() - Method in class com.github.benmanes.caffeine.cache.CaffeineSpec
-
Returns a string representation for this
CaffeineSpec
instance. - toString() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
- toString() - Method in class com.github.benmanes.caffeine.cache.stats.ConcurrentStatsCounter
- totalLoadTime() - Method in class com.github.benmanes.caffeine.cache.stats.CacheStats
-
Returns the total number of nanoseconds the cache has spent loading new values.
V
- valueOf(String) - Static method in enum com.github.benmanes.caffeine.cache.RemovalCause
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum com.github.benmanes.caffeine.cache.RemovalCause
-
Returns an array containing the constants of this enum type, in the order they are declared.
W
- wasEvicted() - Method in enum com.github.benmanes.caffeine.cache.RemovalCause
-
Returns
true
if there was an automatic removal due to eviction (the cause is neitherRemovalCause.EXPLICIT
norRemovalCause.REPLACED
). - weakKeys() - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies that each key (not value) stored in the cache should be wrapped in a
WeakReference
(by default, strong references are used). - weakValues() - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies that each value (not key) stored in the cache should be wrapped in a
WeakReference
(by default, strong references are used). - weigh(K, V) - Method in interface com.github.benmanes.caffeine.cache.Weigher
-
Returns the weight of a cache entry.
- weigher(Weigher<? super K1, ? super V1>) - Method in class com.github.benmanes.caffeine.cache.Caffeine
-
Specifies the weigher to use in determining the weight of entries.
- Weigher<K,V> - Interface in com.github.benmanes.caffeine.cache
-
Calculates the weights of cache entries.
- weight() - Method in interface com.github.benmanes.caffeine.cache.Policy.CacheEntry
-
Returns the entry's weight.
- weightedSize() - Method in interface com.github.benmanes.caffeine.cache.Policy.Eviction
-
Returns the approximate accumulated weight of entries in this cache.
- weightOf(K) - Method in interface com.github.benmanes.caffeine.cache.Policy.Eviction
-
Returns the weight of the entry.
Y
- youngest(@org.checkerframework.checker.index.qual.NonNegative int) - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedExpiration
-
Returns an unmodifiable snapshot
Map
view of the cache with ordered traversal. - youngest(@org.checkerframework.checker.index.qual.NonNegative int) - Method in interface com.github.benmanes.caffeine.cache.Policy.VarExpiration
-
Returns an unmodifiable snapshot
Map
view of the cache with ordered traversal. - youngest(Function<Stream<Policy.CacheEntry<K, V>>, T>) - Method in interface com.github.benmanes.caffeine.cache.Policy.FixedExpiration
-
Returns the computed result from the ordered traversal of the cache entries.
- youngest(Function<Stream<Policy.CacheEntry<K, V>>, T>) - Method in interface com.github.benmanes.caffeine.cache.Policy.VarExpiration
-
Returns the computed result from the ordered traversal of the cache entries.
All Classes All Packages