Class LoadingCacheProxy<K,V>
java.lang.Object
com.github.benmanes.caffeine.jcache.CacheProxy<K,V>
com.github.benmanes.caffeine.jcache.LoadingCacheProxy<K,V>
- All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<javax.cache.Cache.Entry<K,V>>, javax.cache.Cache<K, V>
An implementation of JSR-107
Cache backed by a Caffeine loading cache.-
Nested Class Summary
Nested classes/interfaces inherited from class CacheProxy
CacheProxy.EntryIterator, CacheProxy.NullCompletionListenerNested classes/interfaces inherited from interface javax.cache.Cache
javax.cache.Cache.Entry<K,V> -
Field Summary
FieldsFields inherited from class CacheProxy
cacheLoader, cacheManager, cacheMXBean, closed, configuration, copier, dispatcher, executor, expiry, inFlight, name, statistics, ticker, writer -
Constructor Summary
ConstructorsConstructorDescriptionLoadingCacheProxy(String name, Executor executor, javax.cache.CacheManager cacheManager, CaffeineConfiguration<K, V> configuration, LoadingCache<K, Expirable<V>> cache, EventDispatcher<K, V> dispatcher, javax.cache.integration.CacheLoader<K, V> cacheLoader, javax.cache.expiry.ExpiryPolicy expiry, Ticker ticker, JCacheStatisticsMXBean statistics) -
Method Summary
Modifier and TypeMethodDescription@Nullable VReturns the entries, loading if necessary, and optionally updates their access expiry time.private @Nullable VRetrieves the value from the cache, loading it if necessary.voidloadAll(Set<? extends K> keys, boolean replaceExistingValues, javax.cache.integration.CompletionListener completionListener) Methods inherited from class CacheProxy
clear, close, containsKey, copyMap, copyOf, copyValue, currentTimeMillis, deregisterCacheEntryListener, enableManagement, enableStatistics, getAndFilterExpiredEntries, getAndPut, getAndRemove, getAndReplace, getCacheManager, getConfiguration, getConfiguration, getName, getWriteExpireTimeMS, invoke, invokeAll, isClosed, iterator, nanosToMillis, put, putAll, putIfAbsent, putNoCopyOrAwait, registerCacheEntryListener, remove, remove, removeAll, removeAll, replace, replace, requireNotClosed, setAccessExpirationTime, unwrapMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
cache
-
-
Constructor Details
-
LoadingCacheProxy
public LoadingCacheProxy(String name, Executor executor, javax.cache.CacheManager cacheManager, CaffeineConfiguration<K, V> configuration, LoadingCache<K, Expirable<V>> cache, EventDispatcher<K, V> dispatcher, javax.cache.integration.CacheLoader<K, V> cacheLoader, javax.cache.expiry.ExpiryPolicy expiry, Ticker ticker, JCacheStatisticsMXBean statistics)
-
-
Method Details
-
get
-
getOrLoad
-
getAll
-
getAll
-
loadAll
-