Class JCacheLoaderAdapter<K,V>
- java.lang.Object
-
- com.github.benmanes.caffeine.jcache.integration.JCacheLoaderAdapter<K,V>
-
- All Implemented Interfaces:
AsyncCacheLoader<K,Expirable<V>>,CacheLoader<K,Expirable<V>>
public final class JCacheLoaderAdapter<K,V> extends Object implements CacheLoader<K,Expirable<V>>
An adapter from a JCache cache loader to Caffeine's.
-
-
Constructor Summary
Constructors Constructor Description JCacheLoaderAdapter(CacheLoader<K,V> delegate, EventDispatcher<K,V> dispatcher, ExpiryPolicy expiry, Ticker ticker, JCacheStatisticsMXBean statistics)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable Expirable<V>load(K key)Map<K,Expirable<V>>loadAll(Set<? extends K> keys)voidsetCache(CacheProxy<K,V> cache)Sets the cache instance that was created with this loader.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.benmanes.caffeine.cache.CacheLoader
asyncLoad, asyncLoadAll, asyncReload, reload
-
-
-
-
Constructor Detail
-
JCacheLoaderAdapter
public JCacheLoaderAdapter(CacheLoader<K,V> delegate, EventDispatcher<K,V> dispatcher, ExpiryPolicy expiry, Ticker ticker, JCacheStatisticsMXBean statistics)
-
-
Method Detail
-
setCache
public void setCache(CacheProxy<K,V> cache)
Sets the cache instance that was created with this loader.- Parameters:
cache- the cache that uses this loader
-
-