Package org.elasticsearch.cluster.node
Class DiscoveryNodeRole
java.lang.Object
org.elasticsearch.cluster.node.DiscoveryNodeRole
public abstract class DiscoveryNodeRole
extends java.lang.Object
Represents a node role.
-
Field Summary
Fields Modifier and Type Field Description static java.util.Set<DiscoveryNodeRole>BUILT_IN_ROLESThe built-in node roles.static DiscoveryNodeRoleDATA_ROLERepresents the role for a data node.static DiscoveryNodeRoleINGEST_ROLERepresents the role for an ingest node.static DiscoveryNodeRoleMASTER_ROLERepresents the role for a master-eligible node. -
Constructor Summary
Constructors Modifier Constructor Description protectedDiscoveryNodeRole(java.lang.String roleName, java.lang.String roleNameAbbreviation) -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()booleanisKnownRole()Whether this role is known by this node, or is anDiscoveryNodeRole.UnknownRole.java.lang.StringroleName()The name of the role.java.lang.StringroleNameAbbreviation()The abbreviation of the name of the role.protected abstract Setting<java.lang.Boolean>roleSetting()java.lang.StringtoString()
-
Field Details
-
DATA_ROLE
Represents the role for a data node. -
INGEST_ROLE
Represents the role for an ingest node. -
MASTER_ROLE
Represents the role for a master-eligible node. -
BUILT_IN_ROLES
The built-in node roles.
-
-
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 anDiscoveryNodeRole.UnknownRole. -
roleSetting
-
equals
public final boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public final int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public final java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-