HashMap. Provides HashMap with partition isolation for ServerPlatforms
that support partitioning. Partition isolation is transparent and keeps Map API unchanged.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | DEFAULT_INITIAL_CAPACITY
Default initial capacity used to create |
| private static final float | DEFAULT_LOAD_FACTOR
Default load factor used to create |
| private static final String | DEFAULT_PARTITION_ID
Default short enough partition ID when server does not support partitions. |
| private final int | initialCapacity
Initial capacity used to create |
| private final float | loadFactor
Initial load factor used to create |
| private final Map | |
| private static final ServerPlatform | serverPlatform
Detected server platform. |
| private static final boolean | supportPartitions
Does platform support partitions? |
| Access | Constructor and Description |
|---|---|
| private | IsolatedHashMap()
Constructs an empty |
| private | IsolatedHashMap(final int
Initial capacity used to create initialCapacity, final float HashMaps for individual partitions.Initial load factor used used to create loadFactor)HashMaps for individual partitions.Constructs an empty |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Implements java. |
| public boolean | containsKey(Object
key whose presence in this map is to be tested key)Implements java. true if this map contains a mapping for the specified
key.
|
| public boolean | containsValue(Object
value whose presence in this map is to be tested value)Implements java. true if this map maps one or more keys to the
specified value.
|
| public Set | entrySet()
Implements java. Set view of the mappings contained in this map.
|
| public V | get(Object
the key whose associated value is to be returned key)Implements java. null if this map contains no mapping for the key.
|
| private Map | |
| public boolean | |
| public Set | |
| public static final <K, V> Map | |
| public V | put(K
key with which the specified value is to be associated key, V value to be associated with the specified key value)Implements java. |
| public void | putAll(Map<? extends K, ? extends V>
mappings to be stored in this map m)Implements java. |
| public V | remove(Object
key whose mapping is to be removed from the map key)Implements java. |
| public int | |
| public Collection | values()
Implements java. Collection view of the values contained in this map.
|
| DEFAULT_INITIAL_CAPACITY | back to summary |
|---|---|
| private static final int DEFAULT_INITIAL_CAPACITY Default initial capacity used to create | |
| DEFAULT_LOAD_FACTOR | back to summary |
|---|---|
| private static final float DEFAULT_LOAD_FACTOR Default load factor used to create | |
| DEFAULT_PARTITION_ID | back to summary |
|---|---|
| private static final String DEFAULT_PARTITION_ID Default short enough partition ID when server does not support partitions. | |
| initialCapacity | back to summary |
|---|---|
| private final int initialCapacity Initial capacity used to create | |
| loadFactor | back to summary |
|---|---|
| private final float loadFactor Initial load factor used to create | |
| maps | back to summary |
|---|---|
| private final Map<String, Map<K, V>> maps Partition ID to | |
| serverPlatform | back to summary |
|---|---|
| private static final ServerPlatform serverPlatform Detected server platform. | |
| supportPartitions | back to summary |
|---|---|
| private static final boolean supportPartitions Does platform support partitions? | |
| IsolatedHashMap | back to summary |
|---|---|
| private IsolatedHashMap() Constructs an empty | |
| IsolatedHashMap | back to summary |
|---|---|
| private IsolatedHashMap(final int initialCapacity, final float loadFactor) Constructs an empty | |
| clear | back to summary |
|---|---|
| public void clear() Implements java. Doc from java. Removes all of the mappings from this map (optional operation). The map will be empty after this call returns.
| |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(Object key) Implements java. Doc from java. Returns | |
| containsValue | back to summary |
|---|---|
| public boolean containsValue(Object value) Implements java. Doc from java. Returns | |
| entrySet | back to summary |
|---|---|
| public Set Implements java. Doc from java. Returns a | |
| get | back to summary |
|---|---|
| public V get(Object key) Implements java. Doc from java. Returns the value to which the specified key is mapped,
or More formally, if this map contains a mapping from a key
If this map permits null values, then a return value of
| |
| getMap | back to summary |
|---|---|
| private Map Get | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements java. Doc from java. Returns
| |
| keySet | back to summary |
|---|---|
| public Set Implements java. Doc from java. Returns a | |
| newMap | back to summary |
|---|---|
| public static final <K, V> Map INTERNAL:
Partition isolated | |
| put | back to summary |
|---|---|
| public V put(K key, V value) Implements java. Doc from java. Associates the specified value with the specified key in this map
(optional operation). If the map previously contained a mapping for
the key, the old value is replaced by the specified value. (A map
| |
| putAll | back to summary |
|---|---|
| public void putAll(Map<? extends K, ? extends V> m) Implements java. Doc from java. Copies all of the mappings from the specified map to this map
(optional operation). The effect of this call is equivalent to that
of calling | |
| remove | back to summary |
|---|---|
| public V remove(Object key) Implements java. Doc from java. Removes the mapping for a key from this map if it is present
(optional operation). More formally, if this map contains a mapping
from key Returns the value to which this map previously associated the key,
or If this map permits null values, then a return value of
The map will not contain a mapping for the specified key once the call returns. | |
| size | back to summary |
|---|---|
| public int size() Implements java. Doc from java. Returns the number of key-value mappings in this map. If the
map contains more than
| |
| values | back to summary |
|---|---|
| public Collection Implements java. Doc from java. Returns a
| |