Package one.microstream.cache.types
Class Cache.Default<K,V>
java.lang.Object
one.microstream.cache.types.Cache.Default<K,V>
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<javax.cache.Cache.Entry<K,V>>,javax.cache.Cache<K,V>,Cache<K,V>,Unwrappable
public static class Cache.Default<K,V> extends Object implements Cache<K,V>
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.cache.Cache
javax.cache.Cache.Entry<K extends Object,V extends Object>Nested classes/interfaces inherited from interface one.microstream.cache.types.Cache
Cache.Default<K,V>Nested classes/interfaces inherited from interface one.microstream.cache.types.Unwrappable
Unwrappable.Static -
Method Summary
Modifier and Type Method Description voidclear()voidclose()booleancontainsKey(K key)voidderegisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)voidevict(Iterable<KeyValue<Object,CachedValue>> entriesToEvict)Evicts given entries from this cache.Vget(K key)Map<K,V>getAll(Set<? extends K> keys)VgetAndPut(K key, V value)VgetAndRemove(K key)VgetAndReplace(K key, V value)CacheManagergetCacheManager()CacheConfiguration<K,V>getConfiguration()Returns theCacheConfigurationwhich was used to create this cache.<C extends javax.cache.configuration.Configuration<K, V>>
CgetConfiguration(Class<C> clazz)StringgetName()<T> Tinvoke(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)booleanisClosed()Iterator<javax.cache.Cache.Entry<K,V>>iterator()voidloadAll(Set<? extends K> keys, boolean replaceExistingValues, javax.cache.integration.CompletionListener completionListener)voidput(K key, V value)voidputAll(Map<? extends K,? extends V> map, boolean replaceExistingValues, boolean useWriteThrough)Adds all entries to this cache.booleanputIfAbsent(K key, V value)voidregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)booleanremove(K key)booleanremove(K key, V oldValue)voidremoveAll()voidremoveAll(Set<? extends K> keys)booleanreplace(K key, V value)booleanreplace(K key, V oldValue, V newValue)voidsetManagementEnabled(boolean enabled)Enables or disables the management bean of this cache.voidsetStatisticsEnabled(boolean enabled)Enables or disables statistics gathering.longsize()Returns the amount of entries in this cache.
-
Method Details
-
getName
-
getCacheManager
-
getConfiguration
Description copied from interface:CacheReturns theCacheConfigurationwhich was used to create this cache.- Specified by:
getConfigurationin interfaceCache<K,V>
-
getConfiguration
-
registerCacheEntryListener
-
deregisterCacheEntryListener
-
isClosed
public boolean isClosed() -
close
public void close() -
size
public long size()Description copied from interface:CacheReturns the amount of entries in this cache. -
get
-
getAll
-
containsKey
-
loadAll
-
put
-
getAndPut
-
putAll
public void putAll(Map<? extends K,? extends V> map, boolean replaceExistingValues, boolean useWriteThrough)Description copied from interface:CacheAdds all entries to this cache. -
putIfAbsent
-
remove
-
remove
-
getAndRemove
-
replace
-
replace
-
getAndReplace
-
removeAll
-
removeAll
public void removeAll() -
clear
public void clear() -
iterator
-
setStatisticsEnabled
public void setStatisticsEnabled(boolean enabled)Description copied from interface:CacheEnables or disables statistics gathering.- Specified by:
setStatisticsEnabledin interfaceCache<K,V>
-
setManagementEnabled
public void setManagementEnabled(boolean enabled)Description copied from interface:CacheEnables or disables the management bean of this cache.- Specified by:
setManagementEnabledin interfaceCache<K,V>
-
invokeAll
-
invoke
-
evict
Description copied from interface:CacheEvicts given entries from this cache.
-