org.apache.ignite.internal.managers.discovery

## 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 and Description
`ConsistentIdMapper(GridDiscoveryManager discoveryMgr)` Create an instance of mapper.

### Method Summary

All Methods Instance Methods Concrete Methods
`short` `mapToCompactId(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..
`UUID` `mapToUuid(AffinityTopologyVersion topVer, short nodeConstId)` Maps UUID to compact ID for given baseline topology.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021