K
- The type of the keys.V
- The type of the values.public class BoundedConcurrentHashMap<K,V>
extends java.util.concurrent.ConcurrentHashMap<K,V>
Modifier and Type | Class and Description |
---|---|
static class |
BoundedConcurrentHashMap.BoundedCacheBehaviour |
Constructor and Description |
---|
BoundedConcurrentHashMap(BoundedConcurrentHashMap.BoundedCacheBehaviour boundedCacheBehaviour,
int maxCacheSize)
Initialize a bounded concurrent hash map.
|
Modifier and Type | Method and Description |
---|---|
V |
put(K key,
V value)
Works like the overriden method, except that
null is returned,
if the given element could not be added due to map limitations. |
V |
putIfAbsent(K key,
V value)
Works like the overriden method, except that
null is returned,
if the given element could not be added due to map limitations. |
clear, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keys, keySet, putAll, remove, remove, replace, replace, size, values
public BoundedConcurrentHashMap(BoundedConcurrentHashMap.BoundedCacheBehaviour boundedCacheBehaviour, int maxCacheSize)
boundedCacheBehaviour
- set the cache behaviormaxCacheSize
- define limit of the cachepublic V put(K key, V value)
null
is returned,
if the given element could not be added due to map limitations.put
in interface java.util.Map<K,V>
put
in class java.util.concurrent.ConcurrentHashMap<K,V>
key
- key-valuevalue
- the associated valueCopyright 2017 Kieker Project, http://kieker-monitoring.net