Interface ClusterNode


public interface ClusterNode
Describes a single node in a cluster.
  • Method Details

    • getAddress

      @Nonnull InetSocketAddress getAddress()
      Returns:
      the complete socket address, comprised of hostname and port, for the node
    • getAvailabilityZone

      @Nonnull Optional<String> getAvailabilityZone()
      Returns:
      the availability zone for the node, or empty if the availability zone information is not known.
      Since:
      8.11
    • getBuildVersion

      @Nonnull Version getBuildVersion()
      Returns:
      the build version of this node. Since 7.9, it is possible to have cluster nodes at different versions during rolling upgrade.
      Since:
      7.9
    • getId

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

      Warning: Plugins should make no assumptions about this ID. That includes:

      • How long it is
      • What characters it contains
      • Whether it will be consistent across restarts. Don't persist long-term data against these IDs
      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 identifier for this node
    • getVmId

      @Nonnull String getVmId()
      Retrieves a unique identifier for this node that remains stable while the node is running.

      The value is guaranteed to be unique within the cluster. Unlike the ordinary identifier, if the node leaves and joins the cluster, this value remains the same.

      Returns:
      a cluster-wide unique identifier for this node that remains stable while the node is running
      Since:
      4.8
    • isFullyStarted

      boolean isFullyStarted()
      Returns:
      true if this node has fully started up; false otherwise
      Since:
      4.8
    • isLocal

      boolean isLocal()
      Returns:
      true if this is the local node; otherwise, false for remote nodes
    • getName

      @Nonnull String getName()
      A long living cluster name that is defined by setting the system property cluster.node.name
      Returns:
      The value from the system property named above otherwise an empty string if the property is not set.