public interface IMemoryCache<K,V>
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Destroy the memory cache
|
int |
freeElements(int numberToFree)
This instructs the memory cache to remove the numberToFree
according to its eviction policy.
|
ICacheElement<K,V> |
get(K key)
Get an item from the cache
|
ICompositeCacheAttributes |
getCacheAttributes()
Returns the CacheAttributes for the region.
|
CompositeCache<K,V> |
getCompositeCache()
Gets the cache hub / region that uses the MemoryCache.
|
Set<K> |
getKeySet()
Get a set of the keys for all elements in the memory cache.
|
Map<K,ICacheElement<K,V>> |
getMultiple(Set<K> keys)
Gets multiple items from the cache based on the given set of keys.
|
ICacheElement<K,V> |
getQuiet(K key)
Get an item from the cache without effecting its order or last access
time
|
int |
getSize()
Get the number of elements contained in the memory store
|
IStats |
getStatistics()
Returns the historical and statistical data for a region's memory cache.
|
void |
initialize(CompositeCache<K,V> cache)
Initialize the memory cache
|
boolean |
remove(K key)
Removes an item from the cache
|
void |
removeAll()
Removes all cached items from the cache.
|
void |
setCacheAttributes(ICompositeCacheAttributes cattr)
Sets the CacheAttributes of the region.
|
void |
update(ICacheElement<K,V> ce)
Puts an item to the cache.
|
void |
waterfal(ICacheElement<K,V> ce)
Spools the item contained in the provided element to disk
|
void initialize(CompositeCache<K,V> cache)
cache
- The cache (region) this memory store is attached to.void dispose() throws IOException
IOException
int getSize()
IStats getStatistics()
Set<K> getKeySet()
boolean remove(K key) throws IOException
key
- Identifies item to be removedIOException
- Description of the Exceptionvoid removeAll() throws IOException
IOException
- Description of the Exceptionint freeElements(int numberToFree) throws IOException
numberToFree
- IOException
ICacheElement<K,V> get(K key) throws IOException
key
- Description of the ParameterIOException
- Description of the ExceptionMap<K,ICacheElement<K,V>> getMultiple(Set<K> keys) throws IOException
keys
- IOException
ICacheElement<K,V> getQuiet(K key) throws IOException
key
- Description of the ParameterIOException
- Description of the Exceptionvoid waterfal(ICacheElement<K,V> ce) throws IOException
ce
- Description of the ParameterIOException
- Description of the Exceptionvoid update(ICacheElement<K,V> ce) throws IOException
ce
- Description of the ParameterIOException
- Description of the ExceptionICompositeCacheAttributes getCacheAttributes()
void setCacheAttributes(ICompositeCacheAttributes cattr)
cattr
- The new cacheAttributes valueCompositeCache<K,V> getCompositeCache()
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.