Class DiscoveryNodeRole


  • public abstract class DiscoveryNodeRole
    extends Object
    Represents a node role.
    • Field Detail

      • DATA_ROLE

        public static final DiscoveryNodeRole DATA_ROLE
        Represents the role for a data node.
      • 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.
    • Constructor Detail

      • DiscoveryNodeRole

        protected DiscoveryNodeRole​(String roleName,
                                    String roleNameAbbreviation)
    • Method Detail

      • roleName

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

        public final 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.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object