Class DiscoveryNodeRole


  • public abstract class DiscoveryNodeRole
    extends java.lang.Object
    Represents a node role.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected DiscoveryNodeRole​(java.lang.String roleName, java.lang.String roleNameAbbreviation)  
    • Method Summary

      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      boolean isKnownRole()
      Whether this role is known by this node, or is an DiscoveryNodeRole.UnknownRole.
      java.lang.String roleName()
      The name of the role.
      java.lang.String roleNameAbbreviation()
      The abbreviation of the name of the role.
      protected abstract Setting<java.lang.Boolean> roleSetting()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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.
      • BUILT_IN_ROLES

        public static java.util.Set<DiscoveryNodeRole> BUILT_IN_ROLES
        The built-in node roles.
    • Constructor Detail

      • DiscoveryNodeRole

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

      • 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.
      • roleSetting

        protected abstract Setting<java.lang.Boolean> roleSetting()
      • 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
      • toString

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