Class ConsistentIdMapper
- java.lang.Object
-
- org.apache.ignite.internal.managers.discovery.ConsistentIdMapper
-
public class ConsistentIdMapper extends Object
Class is needed for map UUID to consistent id and vice versa.
-
-
Constructor Summary
Constructors Constructor Description ConsistentIdMapper(GridDiscoveryManager discoveryMgr)Create an instance of mapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description shortmapToCompactId(AffinityTopologyVersion topVer, UUID nodeId)Maps UUID to compact ID for given baseline topology.Map<Short,Collection<Short>>mapToCompactIds(AffinityTopologyVersion topVer, @Nullable Map<UUID,Collection<UUID>> txNodes, BaselineTopology baselineTop)Map primary -> backup node compact ID accordingly to baseline topology..UUIDmapToUuid(AffinityTopologyVersion topVer, short nodeConstId)Maps UUID to compact ID for given baseline topology.
-
-
-
Field Detail
-
ALL_NODES
public static final Short ALL_NODES
Optimization for short store full nodes set.
-
-
Constructor Detail
-
ConsistentIdMapper
public ConsistentIdMapper(GridDiscoveryManager discoveryMgr)
Create an instance of mapper.- Parameters:
discoveryMgr- Discovery manager.
-
-
Method Detail
-
mapToCompactId
public short mapToCompactId(AffinityTopologyVersion topVer, UUID nodeId)
Maps UUID to compact ID for given baseline topology.- Parameters:
topVer- Topology version.nodeId- UUID of node.- Returns:
- Compact ID of node for given baseline topology.
-
mapToUuid
public UUID mapToUuid(AffinityTopologyVersion topVer, short nodeConstId)
Maps UUID to compact ID for given baseline topology.- Parameters:
topVer- Topology version.nodeConstId- UUID of node.- Returns:
- Compact ID of node for given baseline topology.
-
mapToCompactIds
public Map<Short,Collection<Short>> mapToCompactIds(AffinityTopologyVersion topVer, @Nullable @Nullable Map<UUID,Collection<UUID>> txNodes, BaselineTopology baselineTop)
Map primary -> backup node compact ID accordingly to baseline topology..- Parameters:
txNodes- Primary -> backup UUID nodes.- Returns:
- Primary -> backup compact ID nodes.
-
-