public class GridLeanMap<K,V> extends GridSerializableMap<K,V> implements Cloneable
Null-keys are not supported.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
GridLeanMap()
Constructs lean map with initial size of
3. |
GridLeanMap(int size)
Constructs lean map with initial size.
|
GridLeanMap(Map<K,V> m)
Constructs lean map.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
protected Object |
clone() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object val) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
V |
put(K key,
V val) |
V |
remove(Object key) |
int |
size() |
equals, hashCode, isEmpty, keySet, putAll, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic GridLeanMap()
3.public GridLeanMap(int size)
If given size is greater than zero then map activates batch mode for put() operations. In this mode map allows to put up to size number of key-value pairs without internal size optimization, i.e. each next put() in batch doesn't switch backing implementation so that initial implementation is used as long as its capacity allows.
Note that any removal operation either through iterator or map itself turns batch mode off and map starts optimizing size after any modification.
size - Initial size.public int size()
public boolean containsKey(Object key)
containsKey in interface Map<K,V>containsKey in class AbstractMap<K,V>public boolean containsValue(Object val)
containsValue in interface Map<K,V>containsValue in class AbstractMap<K,V>@Nullable public V put(K key, V val) throws NullPointerException
put in interface Map<K,V>put in class AbstractMap<K,V>NullPointerExceptionpublic void clear()
protected Object clone()
clone in class AbstractMap<K,V>
Follow @ApacheIgnite
Ignite Fabric : ver. 2.6.0 Release Date : July 10 2018