Package org.elasticsearch.cluster.node
Class DiscoveryNodeRole
java.lang.Object
org.elasticsearch.cluster.node.DiscoveryNodeRole
- All Implemented Interfaces:
java.lang.Comparable<DiscoveryNodeRole>
public abstract class DiscoveryNodeRole extends java.lang.Object implements java.lang.Comparable<DiscoveryNodeRole>
Represents a node role.
-
Field Summary
Fields Modifier and Type Field Description static java.util.SortedSet<DiscoveryNodeRole>BUILT_IN_ROLESThe built-in node roles.static DiscoveryNodeRoleDATA_COLD_NODE_ROLEstatic DiscoveryNodeRoleDATA_CONTENT_NODE_ROLEstatic DiscoveryNodeRoleDATA_FROZEN_NODE_ROLEstatic DiscoveryNodeRoleDATA_HOT_NODE_ROLEstatic DiscoveryNodeRoleDATA_ROLERepresents the role for a data node.static DiscoveryNodeRoleDATA_WARM_NODE_ROLEstatic DiscoveryNodeRoleINGEST_ROLERepresents the role for an ingest node.static DiscoveryNodeRoleMASTER_ROLERepresents the role for a master-eligible node.static DiscoveryNodeRoleREMOTE_CLUSTER_CLIENT_ROLEstatic VersionREMOTE_CLUSTER_CLIENT_ROLE_VERSIONThe version thatREMOTE_CLUSTER_CLIENT_ROLEis introduced. -
Constructor Summary
Constructors Modifier Constructor Description protectedDiscoveryNodeRole(java.lang.String roleName, java.lang.String roleNameAbbreviation)protectedDiscoveryNodeRole(java.lang.String roleName, java.lang.String roleNameAbbreviation, boolean canContainData) -
Method Summary
Modifier and Type Method Description booleancanContainData()Indicates whether a node with this role can contain data.intcompareTo(DiscoveryNodeRole o)booleanequals(java.lang.Object o)DiscoveryNodeRolegetCompatibilityRole(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)booleanisKnownRole()Whether this role is known by this node, or is anDiscoveryNodeRole.UnknownRole.abstract Setting<java.lang.Boolean>legacySetting()java.lang.StringroleName()The name of the role.java.lang.StringroleNameAbbreviation()The abbreviation of the name of the role.java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
DATA_ROLE
Represents 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_ROLE
Represents the role for an ingest node. -
MASTER_ROLE
Represents the role for a master-eligible node. -
REMOTE_CLUSTER_CLIENT_ROLE
-
BUILT_IN_ROLES
The built-in node roles. -
REMOTE_CLUSTER_CLIENT_ROLE_VERSION
The 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
protected DiscoveryNodeRole(java.lang.String roleName, java.lang.String roleNameAbbreviation) -
DiscoveryNodeRole
protected DiscoveryNodeRole(java.lang.String roleName, java.lang.String roleNameAbbreviation, boolean canContainData)
-
-
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
-
canContainData
public 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
-
isKnownRole
public final boolean isKnownRole()Whether this role is known by this node, or is anDiscoveryNodeRole.UnknownRole. -
isEnabledByDefault
-
legacySetting
-
getCompatibilityRole
When 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
public final boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public final int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
compareTo
- Specified by:
compareToin interfacejava.lang.Comparable<DiscoveryNodeRole>
-
toString
public final java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-