Package org.apache.ignite.internal.util
Class GridPartitionStateMap
- java.lang.Object
-
- java.util.AbstractMap<Integer,GridDhtPartitionState>
-
- org.apache.ignite.internal.util.GridPartitionStateMap
-
- All Implemented Interfaces:
Serializable,Map<Integer,GridDhtPartitionState>
public class GridPartitionStateMap extends AbstractMap<Integer,GridDhtPartitionState> implements Serializable
Grid partition state map. States are encoded using bits.Null values are prohibited.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static GridPartitionStateMapEMPTYEmpty map.
-
Constructor Summary
Constructors Constructor Description GridPartitionStateMap()Default constructor.GridPartitionStateMap(int parts)GridPartitionStateMap(GridPartitionStateMap from, boolean onlyActive)Creates map copy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(Object key)Set<Map.Entry<Integer,GridDhtPartitionState>>entrySet()booleanequals(Object o)GridDhtPartitionStateget(Object key)inthashCode()GridDhtPartitionStateput(Integer key, GridDhtPartitionState val)GridDhtPartitionStateremove(Object key)intsize()GridDhtPartitionStatestate(int part)-
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, isEmpty, keySet, putAll, toString, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Field Detail
-
EMPTY
public static final GridPartitionStateMap EMPTY
Empty map.
-
-
Constructor Detail
-
GridPartitionStateMap
public GridPartitionStateMap()
Default constructor.
-
GridPartitionStateMap
public GridPartitionStateMap(int parts)
- Parameters:
parts- Partitions to hold.
-
GridPartitionStateMap
public GridPartitionStateMap(GridPartitionStateMap from, boolean onlyActive)
Creates map copy.- Parameters:
from- Source map.onlyActive- Retains only active partitions.
-
-
Method Detail
-
entrySet
public Set<Map.Entry<Integer,GridDhtPartitionState>> entrySet()
- Specified by:
entrySetin interfaceMap<Integer,GridDhtPartitionState>- Specified by:
entrySetin classAbstractMap<Integer,GridDhtPartitionState>
-
put
public GridDhtPartitionState put(Integer key, GridDhtPartitionState val)
- Specified by:
putin interfaceMap<Integer,GridDhtPartitionState>- Overrides:
putin classAbstractMap<Integer,GridDhtPartitionState>
-
get
public GridDhtPartitionState get(Object key)
- Specified by:
getin interfaceMap<Integer,GridDhtPartitionState>- Overrides:
getin classAbstractMap<Integer,GridDhtPartitionState>
-
remove
public GridDhtPartitionState remove(Object key)
- Specified by:
removein interfaceMap<Integer,GridDhtPartitionState>- Overrides:
removein classAbstractMap<Integer,GridDhtPartitionState>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<Integer,GridDhtPartitionState>- Overrides:
containsKeyin classAbstractMap<Integer,GridDhtPartitionState>
-
size
public int size()
- Specified by:
sizein interfaceMap<Integer,GridDhtPartitionState>- Overrides:
sizein classAbstractMap<Integer,GridDhtPartitionState>
-
state
public GridDhtPartitionState state(int part)
-
equals
public boolean equals(Object o)
- Specified by:
equalsin interfaceMap<Integer,GridDhtPartitionState>- Overrides:
equalsin classAbstractMap<Integer,GridDhtPartitionState>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceMap<Integer,GridDhtPartitionState>- Overrides:
hashCodein classAbstractMap<Integer,GridDhtPartitionState>
-
-