Package org.elasticsearch.cluster.node
Class DiscoveryNodeRole
- java.lang.Object
-
- org.elasticsearch.cluster.node.DiscoveryNodeRole
-
public abstract class DiscoveryNodeRole extends Object
Represents a node role.
-
-
Field Summary
Fields Modifier and Type Field Description static 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(String roleName, String roleNameAbbreviation)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()booleanisKnownRole()Whether this role is known by this node, or is anDiscoveryNodeRole.UnknownRole.StringroleName()The name of the role.StringroleNameAbbreviation()The abbreviation of the name of the role.protected abstract Setting<Boolean>roleSetting()StringtoString()
-
-
-
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 Set<DiscoveryNodeRole> BUILT_IN_ROLES
The built-in node roles.
-
-
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 anDiscoveryNodeRole.UnknownRole.
-
-