Class DiscoveryNodeRole

org.elasticsearch.cluster.node.DiscoveryNodeRole
All Implemented Interfaces:
<DiscoveryNodeRole>

public abstract class DiscoveryNodeRole extends implements <DiscoveryNodeRole>
Represents a node role.
  • Field Details

    • DATA_ROLE

      public static final DiscoveryNodeRole DATA_ROLE
      Represents the role for a data node.
    • DATA_CONTENT_NODE_ROLE

      public static DiscoveryNodeRole DATA_CONTENT_NODE_ROLE
    • DATA_HOT_NODE_ROLE

      public static DiscoveryNodeRole DATA_HOT_NODE_ROLE
    • DATA_WARM_NODE_ROLE

      public static DiscoveryNodeRole DATA_WARM_NODE_ROLE
    • DATA_COLD_NODE_ROLE

      public static DiscoveryNodeRole DATA_COLD_NODE_ROLE
    • DATA_FROZEN_NODE_ROLE

      public static DiscoveryNodeRole DATA_FROZEN_NODE_ROLE
    • INGEST_ROLE

      public static final DiscoveryNodeRole INGEST_ROLE
      Represents the role for an ingest node.
    • MASTER_ROLE

      public static final DiscoveryNodeRole MASTER_ROLE
      Represents the role for a master-eligible node.
    • REMOTE_CLUSTER_CLIENT_ROLE

      public static final DiscoveryNodeRole REMOTE_CLUSTER_CLIENT_ROLE
    • BUILT_IN_ROLES

      public static final <DiscoveryNodeRole> BUILT_IN_ROLES
      The built-in node roles.
    • REMOTE_CLUSTER_CLIENT_ROLE_VERSION

      public static final Version REMOTE_CLUSTER_CLIENT_ROLE_VERSION
      The version that REMOTE_CLUSTER_CLIENT_ROLE is introduced. Nodes before this version do not have that role even they can connect to remote clusters.
  • Constructor Details

    • DiscoveryNodeRole

      protected DiscoveryNodeRole( roleName,  roleNameAbbreviation)
    • DiscoveryNodeRole

      protected DiscoveryNodeRole( roleName,  roleNameAbbreviation, boolean canContainData)
  • Method Details

    • roleName

      public final  roleName()
      The name of the role.
      Returns:
      the role name
    • roleNameAbbreviation

      public final  roleNameAbbreviation()
      The abbreviation of the name of the role. This is used in the cat nodes API to display an abbreviated version of the name of the role.
      Returns:
      the role name abbreviation
    • canContainData

      public final boolean canContainData()
      Indicates whether a node with this role can contain data.
      Returns:
      true if a node with this role can contain data, otherwise false
    • isKnownRole

      public final boolean isKnownRole()
      Whether this role is known by this node, or is an DiscoveryNodeRole.UnknownRole.
    • isEnabledByDefault

      public boolean isEnabledByDefault(Settings settings)
    • legacySetting

      public abstract > legacySetting()
    • getCompatibilityRole

      public DiscoveryNodeRole getCompatibilityRole(Version nodeVersion)
      When serializing a DiscoveryNodeRole, the role may not be available to nodes of previous versions, where the role had not yet been added. This method allows overriding the role that should be serialized when communicating to versions prior to the introduction of the discovery node role.
    • equals

      public final boolean equals( o)
      Overrides:
       in class 
    • hashCode

      public final int hashCode()
      Overrides:
       in class 
    • compareTo

      public final int compareTo(DiscoveryNodeRole o)
      Specified by:
       in interface <DiscoveryNodeRole>
    • toString

      public final  toString()
      Overrides:
       in class