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 void
clear()
void
close()
boolean
containsKey(K key)
void
deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
void
evict(Iterable<KeyValue<Object,CachedValue>> entriesToEvict)
Evicts given entries from this cache.V
get(K key)
Map<K,V>
getAll(Set<? extends K> keys)
V
getAndPut(K key, V value)
V
getAndRemove(K key)
V
getAndReplace(K key, V value)
CacheManager
getCacheManager()
CacheConfiguration<K,V>
getConfiguration()
Returns theCacheConfiguration
which was used to create this cache.<C extends javax.cache.configuration.Configuration<K, V>>
CgetConfiguration(Class<C> clazz)
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()
void
loadAll(Set<? extends K> keys, boolean replaceExistingValues, javax.cache.integration.CompletionListener completionListener)
void
put(K key, V value)
void
putAll(Map<? extends K,? extends V> map, boolean replaceExistingValues, boolean useWriteThrough)
Adds all entries to this cache.boolean
putIfAbsent(K key, V value)
void
registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
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)
void
setManagementEnabled(boolean enabled)
Enables or disables the management bean of this cache.void
setStatisticsEnabled(boolean enabled)
Enables or disables statistics gathering.long
size()
Returns the amount of entries in this cache.
-
Method Details
-
getName
-
getCacheManager
-
getConfiguration
Description copied from interface:Cache
Returns theCacheConfiguration
which was used to create this cache.- Specified by:
getConfiguration
in interfaceCache<K,V>
-
getConfiguration
-
registerCacheEntryListener
-
deregisterCacheEntryListener
-
isClosed
public boolean isClosed() -
close
public void close() -
size
public long size()Description copied from interface:Cache
Returns 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:Cache
Adds 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:Cache
Enables or disables statistics gathering.- Specified by:
setStatisticsEnabled
in interfaceCache<K,V>
-
setManagementEnabled
public void setManagementEnabled(boolean enabled)Description copied from interface:Cache
Enables or disables the management bean of this cache.- Specified by:
setManagementEnabled
in interfaceCache<K,V>
-
invokeAll
-
invoke
-
evict
Description copied from interface:Cache
Evicts given entries from this cache.
-