Class ConsistentIdMapper


  • public class ConsistentIdMapper
    extends Object
    Class is needed for map UUID to consistent id and vice versa.
    • 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.