Class ClusterGraph
- java.lang.Object
-
- org.apache.ignite.internal.cluster.graph.ClusterGraph
-
public class ClusterGraph extends Object
Class to represent cluster nodes avalaible connections as graph. Provides several graph algorithms to analyze cluster nodes connections.
-
-
Constructor Summary
Constructors Constructor Description ClusterGraph(CommunicationFailureContext ctx, Predicate<ClusterNode> nodeFilterOut)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckFullyConnected(BitSet nodesSet)Checks that givennodesSetforms fully-connected component.List<BitSet>findConnectedComponents()Finds connected components in cluster graph.BitSetfindLargestFullyConnectedComponent(BitSet nodesSet)Finds largest fully-connected component from givennodesSet.
-
-
-
Constructor Detail
-
ClusterGraph
public ClusterGraph(CommunicationFailureContext ctx, Predicate<ClusterNode> nodeFilterOut)
Constructor.- Parameters:
ctx- Communication failure context.nodeFilterOut- Filter to exclude some cluster nodes from graph.
-
-
Method Detail
-
findConnectedComponents
public List<BitSet> findConnectedComponents()
Finds connected components in cluster graph.- Returns:
- List of set of nodes, each set represents connected component.
-
findLargestFullyConnectedComponent
public BitSet findLargestFullyConnectedComponent(BitSet nodesSet)
Finds largest fully-connected component from givennodesSet.- Parameters:
nodesSet- Set of nodes.- Returns:
- Set of nodes which forms largest fully-connected component.
-
checkFullyConnected
public boolean checkFullyConnected(BitSet nodesSet)
Checks that givennodesSetforms fully-connected component.- Parameters:
nodesSet- Set of cluster nodes.- Returns:
Trueif all given cluster nodes are able to connect to each other.
-
-