Class IdealAffinityAssignment
- java.lang.Object
-
- org.apache.ignite.internal.processors.affinity.IdealAffinityAssignment
-
public class IdealAffinityAssignment extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<List<ClusterNode>>assignment()static Map<Object,Set<Integer>>calculatePrimaries(@Nullable List<ClusterNode> nodes, List<List<ClusterNode>> assignment)static IdealAffinityAssignmentcreate(AffinityTopologyVersion topVer, @Nullable List<ClusterNode> nodes, List<List<ClusterNode>> assignment)static IdealAffinityAssignmentcreate(AffinityTopologyVersion topVer, List<List<ClusterNode>> assignment)static IdealAffinityAssignmentcreateWithPreservedPrimaries(AffinityTopologyVersion topVer, List<List<ClusterNode>> assignment, IdealAffinityAssignment previousAssignment)ClusterNodecurrentPrimary(int partition)Set<Integer>idealPrimaries(ClusterNode clusterNode)AffinityTopologyVersiontopologyVersion()
-
-
-
Method Detail
-
idealPrimaries
public Set<Integer> idealPrimaries(ClusterNode clusterNode)
- Parameters:
clusterNode- Cluster node.
-
currentPrimary
public ClusterNode currentPrimary(int partition)
- Parameters:
partition- Partition.
-
assignment
public List<List<ClusterNode>> assignment()
-
topologyVersion
public AffinityTopologyVersion topologyVersion()
-
calculatePrimaries
public static Map<Object,Set<Integer>> calculatePrimaries(@Nullable @Nullable List<ClusterNode> nodes, List<List<ClusterNode>> assignment)
- Parameters:
nodes- Nodes.assignment- Assignment.
-
create
public static IdealAffinityAssignment create(AffinityTopologyVersion topVer, List<List<ClusterNode>> assignment)
- Parameters:
topVer- Topology version.assignment- Assignment.
-
create
public static IdealAffinityAssignment create(AffinityTopologyVersion topVer, @Nullable @Nullable List<ClusterNode> nodes, List<List<ClusterNode>> assignment)
- Parameters:
topVer- Topology version.nodes- Nodes.assignment- Assignment.
-
createWithPreservedPrimaries
public static IdealAffinityAssignment createWithPreservedPrimaries(AffinityTopologyVersion topVer, List<List<ClusterNode>> assignment, IdealAffinityAssignment previousAssignment)
- Parameters:
topVer- Topology version.assignment- Assignment.previousAssignment- Previous assignment.
-
-