Class DiscoveryNodeRole

java.lang.Object
org.elasticsearch.cluster.node.DiscoveryNodeRole
All Implemented Interfaces:
java.lang.Comparable<DiscoveryNodeRole>

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

  • Constructor Details

    • DiscoveryNodeRole

      protected DiscoveryNodeRole​(java.lang.String roleName, java.lang.String roleNameAbbreviation)
  • Method Details

    • roleName

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

      public final java.lang.String 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
    • 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 Setting<java.lang.Boolean> legacySetting()
    • equals

      public final boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • compareTo

      public final int compareTo​(DiscoveryNodeRole o)
      Specified by:
      compareTo in interface java.lang.Comparable<DiscoveryNodeRole>
    • toString

      public final java.lang.String toString()
      Overrides:
      toString in class java.lang.Object