Interface ClusterService


public interface ClusterService
Provides access to cluster details for the instance.
  • Method Details

    • getInformation

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

      @Nonnull String getNodeId()
      Convenience method for obtaining the ID for the local node. Calling the method is equivalent to calling getInformation().getLocalNode().getId()
      Returns:
      the ID of the local node
    • getNodeStates

      @Nonnull Map<ClusterNode,ApplicationState> getNodeStates() throws ClusterExecutionException
      Retrieve the current status of the individual cluster nodes. The nodes returned may be incomplete; absence of a node should be considered a status of UNKNOWN.
      Returns:
      The status of the individual nodes that were available.
      Throws:
      ClusterExecutionException - when execution on the remote nodes fails for any reason
      Since:
      8.0
    • isAvailable

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

      boolean isClustered()
      Returns:
      true if clustering is available and at least two nodes have joined the cluster
    • isLeader

      boolean isLeader()
      Returns:
      true if the current node is the leader node; also true if clustering is not enabled
      Since:
      7.12