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_ROLES
The built-in node roles.static DiscoveryNodeRole
DATA_ROLE
Represents the role for a data node.static DiscoveryNodeRole
INGEST_ROLE
Represents the role for an ingest node.static DiscoveryNodeRole
MASTER_ROLE
Represents the role for a master-eligible node.static DiscoveryNodeRole
REMOTE_CLUSTER_CLIENT_ROLE
-
Constructor Summary
Constructors Modifier Constructor Description protected
DiscoveryNodeRole(java.lang.String roleName, java.lang.String roleNameAbbreviation)
-
Method Summary
Modifier and Type Method Description int
compareTo(DiscoveryNodeRole o)
boolean
equals(java.lang.Object o)
int
hashCode()
boolean
isKnownRole()
Whether this role is known by this node, or is anDiscoveryNodeRole.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()
-
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. -
REMOTE_CLUSTER_CLIENT_ROLE
-
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:
equals
in classjava.lang.Object
-
hashCode
public final int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
compareTo
- Specified by:
compareTo
in interfacejava.lang.Comparable<DiscoveryNodeRole>
-
toString
public final java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-