Interface ClusterService

All Known Implementing Classes:
ClusterServiceImpl, MockClusterService

public interface ClusterService
Provides data about clustering configuration
Since:
2.12.0
  • Method Details

    • isAvailable

      boolean isAvailable()
      Returns:
      true if clustering is available, otherwise false
    • getNodeId

      @Nonnull String getNodeId()
      Retrieves a cluster-wide unique identifier for this node.

      The value is guaranteed to be unique within the cluster. If the cluster is restarted, every node's ID will still be unique but will likely not be the same as the previous value.

      Returns:
      a cluster-wide unique opaque identifier for this node
      See Also:
    • getClusterNode

      @ExperimentalApi Optional<ClusterNode> getClusterNode()
      Retrieves details for this node
      Returns:
      details for this node or empty optional if clustering is unavailable
    • getInformation

      @Nonnull ClusterInformation getInformation()
      Returns:
      details about the cluster and its nodes