Class 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 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 given nodesSet.
        Parameters:
        nodesSet - Set of nodes.
        Returns:
        Set of nodes which forms largest fully-connected component.
      • checkFullyConnected

        public boolean checkFullyConnected​(BitSet nodesSet)
        Checks that given nodesSet forms fully-connected component.
        Parameters:
        nodesSet - Set of cluster nodes.
        Returns:
        True if all given cluster nodes are able to connect to each other.