public class JCacheAdapter<K,V> extends Object implements javax.cache.Cache<K,V>
| Modifier and Type | Field and Description |
|---|---|
protected org.cache2k.core.InternalCache<K,V> |
cache |
protected AtomicLong |
iterationHitCorrectionCounter |
protected boolean |
jmxEnabled |
protected boolean |
jmxStatisticsEnabled |
protected boolean |
readThrough |
| Constructor and Description |
|---|
JCacheAdapter(JCacheManagerAdapter manager,
org.cache2k.Cache<K,V> cache,
Class<K> keyType,
Class<V> valueType,
boolean storeByValue,
boolean readThrough,
boolean loaderConfigured,
EventHandling<K,V> eventHandling) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
close() |
boolean |
containsKey(K key) |
void |
deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cfg) |
V |
get(K k) |
Map<K,V> |
getAll(Set<? extends K> keys) |
V |
getAndPut(K key,
V value) |
V |
getAndRemove(K key) |
V |
getAndReplace(K key,
V value) |
javax.cache.CacheManager |
getCacheManager() |
<C extends javax.cache.configuration.Configuration<K,V>> |
getConfiguration(Class<C> type) |
String |
getName() |
<T> T |
invoke(K key,
javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
Object... arguments) |
<T> Map<K,javax.cache.processor.EntryProcessorResult<T>> |
invokeAll(Set<? extends K> keys,
javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
Object... arguments) |
boolean |
isClosed() |
Iterator<javax.cache.Cache.Entry<K,V>> |
iterator()
Iterate with the help of cache2k key iterator.
|
void |
loadAll(Set<? extends K> keys,
boolean replaceExistingValues,
javax.cache.integration.CompletionListener completionListener) |
void |
put(K k,
V v) |
void |
putAll(Map<? extends K,? extends V> map) |
boolean |
putIfAbsent(K key,
V value) |
void |
registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cfg) |
boolean |
remove(K key) |
boolean |
remove(K key,
V oldValue) |
void |
removeAll() |
void |
removeAll(Set<? extends K> keys) |
boolean |
replace(K key,
V value) |
boolean |
replace(K key,
V oldValue,
V newValue) |
String |
toString() |
<T> T |
unwrap(Class<T> clazz) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorprotected final boolean readThrough
protected final AtomicLong iterationHitCorrectionCounter
protected volatile boolean jmxStatisticsEnabled
protected volatile boolean jmxEnabled
public JCacheAdapter(JCacheManagerAdapter manager, org.cache2k.Cache<K,V> cache, Class<K> keyType, Class<V> valueType, boolean storeByValue, boolean readThrough, boolean loaderConfigured, EventHandling<K,V> eventHandling)
public boolean containsKey(K key)
public void loadAll(Set<? extends K> keys, boolean replaceExistingValues, javax.cache.integration.CompletionListener completionListener)
public <C extends javax.cache.configuration.Configuration<K,V>> C getConfiguration(Class<C> type)
public <T> T invoke(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... arguments) throws javax.cache.processor.EntryProcessorException
public <T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... arguments)
public javax.cache.CacheManager getCacheManager()
public void close()
public void registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cfg)
public void deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cfg)
public Iterator<javax.cache.Cache.Entry<K,V>> iterator()
cache2k API documentation. Copyright © 2000–2020 headissue GmbH, Munich.