K - KeyV - Valuepublic class ConcurrentAgingLRUHashMap<K,V> extends Object
| Modifier and Type | Field and Description |
|---|---|
CopyOnWriteArrayList<NMAlgoListener> |
algoListenerList |
| Constructor and Description |
|---|
ConcurrentAgingLRUHashMap(long size)
Constructs a ConcurrentAgingLRUHashMap structure.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all entries in the map.
|
Set<Map.Entry<K,V>> |
entrySet()
Return a set with key value pair.
|
V |
get(K key)
Returns the value for given key.
|
void |
othersClear() |
void |
put(K key,
V value)
Stores the key value pair into the Map.
|
void |
remove(K key)
Remove the value for given key.
|
void |
removeOthers(K key)
Remove the value for given key.
|
void |
replace(K key,
V value)
Replace the entry for the given Key Value pair.
|
int |
size()
Returns the number of entries.
|
Collection<V> |
values()
Return a collection with only values
|
public CopyOnWriteArrayList<NMAlgoListener> algoListenerList
public ConcurrentAgingLRUHashMap(long size)
size - max size allowed for the mappublic int size()
public V get(K key)
key - for which value needs to retrievedpublic void put(K key, V value)
key - Keyvalue - Valuepublic void remove(K key)
key - remove value corresponding to keypublic void removeOthers(K key)
key - remove value corresponding to keypublic void replace(K key, V value)
key - Keyvalue - Valuepublic Set<Map.Entry<K,V>> entrySet()
public Collection<V> values()
public void clear()
public void othersClear()
Copyright © 2014. All Rights Reserved.