org.apache.ignite.internal.cluster.graph

## 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 and Description
`ClusterGraph(CommunicationFailureContext ctx, Predicate<ClusterNode> nodeFilterOut)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `checkFullyConnected(BitSet nodesSet)` Checks that given `nodesSet` forms fully-connected component.
`List<BitSet>` `findConnectedComponents()` Finds connected components in cluster graph.
`BitSet` `findLargestFullyConnectedComponent(BitSet nodesSet)` Finds largest fully-connected component from given `nodesSet`.

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

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

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

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020