| Modifier and Type | Field and Description |
|---|---|
protected EvictionCallback |
callback |
protected Map<CacheKey,Object> |
map |
protected int |
maxEntries |
| Constructor and Description |
|---|
DefaultCacheMap(int maxEntries) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all elements from map.
|
boolean |
contains(CacheKey key)
Checks if map contains value for key specified.
|
protected void |
entryRemoved(Map.Entry<CacheKey,Object> eldest) |
Object |
get(CacheKey key)
Gets value associated with the key.
|
Collection<CacheKey> |
getAllKeys()
Returns all keys currently stored in this map.
|
long |
getCacheMaxEntries()
Returns max cache size above which eviction occurs.
|
Object |
put(CacheKey key,
Object value)
Puts new value into the map.
|
void |
registerEvictionCallback(EvictionCallback callback)
Notifies cache region when eviction occurs.
|
Object |
remove(CacheKey key)
Removes value from the map.
|
long |
size()
Returns number of elements currently stored in the cache
|
protected final int maxEntries
protected EvictionCallback callback
public void registerEvictionCallback(EvictionCallback callback)
CacheMapregisterEvictionCallback in interface CacheMappublic Object get(CacheKey key)
CacheMappublic Object put(CacheKey key, Object value)
CacheMappublic Object remove(CacheKey key)
CacheMappublic boolean contains(CacheKey key)
CacheMappublic long getCacheMaxEntries()
CacheMapgetCacheMaxEntries in interface CacheMappublic void clear()
CacheMappublic long size()
CacheMappublic Collection<CacheKey> getAllKeys()
CacheMapgetAllKeys in interface CacheMapCopyright © 2017 SAP SE. All Rights Reserved.