Package org.elasticsearch.cluster.node
Class DiscoveryNodeRole
java.lang.Object
org.elasticsearch.cluster.node.DiscoveryNodeRole
- All Implemented Interfaces:
- Comparable<DiscoveryNodeRole>
Represents a node role.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic SortedSet<DiscoveryNodeRole>The built-in node roles.static DiscoveryNodeRolestatic DiscoveryNodeRolestatic DiscoveryNodeRolestatic DiscoveryNodeRolestatic DiscoveryNodeRoleRepresents the role for a data node.static DiscoveryNodeRolestatic DiscoveryNodeRoleRepresents the role for an ingest node.static DiscoveryNodeRoleRepresents the role for a master-eligible node.static DiscoveryNodeRolestatic VersionThe version thatREMOTE_CLUSTER_CLIENT_ROLEis introduced.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDiscoveryNodeRole(String roleName, String roleNameAbbreviation)protectedDiscoveryNodeRole(String roleName, String roleNameAbbreviation, boolean canContainData)
- 
Method SummaryModifier and TypeMethodDescriptionbooleanIndicates whether a node with this role can contain data.intbooleangetCompatibilityRole(Version nodeVersion)When serializing aDiscoveryNodeRole, the role may not be available to nodes of previous versions, where the role had not yet been added.inthashCode()booleanisEnabledByDefault(Settings settings)booleanWhether this role is known by this node, or is anDiscoveryNodeRole.UnknownRole.roleName()The name of the role.The abbreviation of the name of the role.toString()
- 
Field Details- 
DATA_ROLERepresents the role for a data node.
- 
DATA_CONTENT_NODE_ROLE
- 
DATA_HOT_NODE_ROLE
- 
DATA_WARM_NODE_ROLE
- 
DATA_COLD_NODE_ROLE
- 
DATA_FROZEN_NODE_ROLE
- 
INGEST_ROLERepresents the role for an ingest node.
- 
MASTER_ROLERepresents the role for a master-eligible node.
- 
REMOTE_CLUSTER_CLIENT_ROLE
- 
BUILT_IN_ROLESThe built-in node roles.
- 
REMOTE_CLUSTER_CLIENT_ROLE_VERSIONThe version thatREMOTE_CLUSTER_CLIENT_ROLEis introduced. Nodes before this version do not have that role even they can connect to remote clusters.
 
- 
- 
Constructor Details- 
DiscoveryNodeRole
- 
DiscoveryNodeRole
 
- 
- 
Method Details- 
roleNameThe name of the role.- Returns:
- the role name
 
- 
roleNameAbbreviationThe 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
 
- 
canContainDatapublic final boolean canContainData()Indicates whether a node with this role can contain data.- Returns:
- true if a node with this role can contain data, otherwise false
 
- 
isKnownRolepublic final boolean isKnownRole()Whether this role is known by this node, or is anDiscoveryNodeRole.UnknownRole.
- 
isEnabledByDefault
- 
legacySetting
- 
getCompatibilityRoleWhen serializing aDiscoveryNodeRole, the role may not be available to nodes of previous versions, where the role had not yet been added. This method allows overriding the role that should be serialized when communicating to versions prior to the introduction of the discovery node role.
- 
equals
- 
hashCodepublic final int hashCode()
- 
compareTo- Specified by:
- compareToin interface- Comparable<DiscoveryNodeRole>
 
- 
toString
 
-