Class GridDhtPartitionFullMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<UUID,GridDhtPartitionMap>
-
- org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionFullMap
-
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,Comparable<GridDhtPartitionFullMap>,Map<UUID,GridDhtPartitionMap>
public class GridDhtPartitionFullMap extends HashMap<UUID,GridDhtPartitionMap> implements Comparable<GridDhtPartitionFullMap>, Externalizable
Full partition map from all nodes.- 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>
-
-
Constructor Summary
Constructors Constructor Description GridDhtPartitionFullMap()Empty constructor required forExternalizable.GridDhtPartitionFullMap(UUID nodeId, long nodeOrder, long updateSeq)GridDhtPartitionFullMap(UUID nodeId, long nodeOrder, long updateSeq, Map<UUID,GridDhtPartitionMap> m, boolean onlyActive)GridDhtPartitionFullMap(GridDhtPartitionFullMap m, long updateSeq)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(@NotNull GridDhtPartitionFullMap o)booleanequals(Object o)inthashCode()Stringmap2string()voidnewUpdateSequence(long updateSeq)UUIDnodeId()longnodeOrder()booleanpartitionStateEquals(GridDhtPartitionFullMap fullMap)voidreadExternal(ObjectInput in)StringtoFullString()StringtoString()longupdateSequence()longupdateSequence(long updateSeq)booleanvalid()voidwriteExternal(ObjectOutput out)-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Constructor Detail
-
GridDhtPartitionFullMap
public GridDhtPartitionFullMap(UUID nodeId, long nodeOrder, long updateSeq)
- Parameters:
nodeId- Node ID.nodeOrder- Node order.updateSeq- Update sequence number.
-
GridDhtPartitionFullMap
public GridDhtPartitionFullMap(UUID nodeId, long nodeOrder, long updateSeq, Map<UUID,GridDhtPartitionMap> m, boolean onlyActive)
- Parameters:
nodeId- Node ID.nodeOrder- Node order.updateSeq- Update sequence number.m- Map to copy.onlyActive- Iftrue, then only active partitions will be included.
-
GridDhtPartitionFullMap
public GridDhtPartitionFullMap(GridDhtPartitionFullMap m, long updateSeq)
- Parameters:
m- Map to copy.updateSeq- Update sequence.
-
GridDhtPartitionFullMap
public GridDhtPartitionFullMap()
Empty constructor required forExternalizable.
-
-
Method Detail
-
valid
public boolean valid()
- Returns:
Trueif properly initialized.
-
nodeId
public UUID nodeId()
- Returns:
- Node ID.
-
nodeOrder
public long nodeOrder()
- Returns:
- Node order.
-
updateSequence
public long updateSequence()
- Returns:
- Update sequence.
-
partitionStateEquals
public boolean partitionStateEquals(GridDhtPartitionFullMap fullMap)
- Parameters:
fullMap- Map.- Returns:
Trueif this map and given map contain the same data.
-
newUpdateSequence
public void newUpdateSequence(long updateSeq)
- Parameters:
updateSeq- New update sequence value.
-
updateSequence
public long updateSequence(long updateSeq)
- Parameters:
updateSeq- New update sequence value.- Returns:
- Old update sequence value.
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
equals
public boolean equals(Object o)
- Specified by:
equalsin interfaceMap<UUID,GridDhtPartitionMap>- Overrides:
equalsin classAbstractMap<UUID,GridDhtPartitionMap>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceMap<UUID,GridDhtPartitionMap>- Overrides:
hashCodein classAbstractMap<UUID,GridDhtPartitionMap>
-
map2string
public String map2string()
- Returns:
- Map string representation.
-
toFullString
public String toFullString()
- Returns:
- Full string representation.
-
toString
public String toString()
- Overrides:
toStringin classAbstractMap<UUID,GridDhtPartitionMap>
-
compareTo
public int compareTo(@NotNull @NotNull GridDhtPartitionFullMap o)- Specified by:
compareToin interfaceComparable<GridDhtPartitionFullMap>
-
-