Package com.yahoo.config.provision
Enum NodeType
- java.lang.Object
-
- java.lang.Enum<NodeType>
-
- com.yahoo.config.provision.NodeType
-
- All Implemented Interfaces:
Serializable
,Comparable<NodeType>
public enum NodeType extends Enum<NodeType>
The possible types of nodes in the node repository- Author:
- bratseth
-
-
Enum Constant Summary
Enum Constants Enum Constant Description config
Config server nodeconfighost
Host of a config server nodecontroller
Controller nodecontrollerhost
Host of a controller nodehost
Host of a tenant nodesproxy
Node serving the shared proxy layerproxyhost
Host of a proxy nodetenant
Node assignable to a tenant to run application workloads
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRun(NodeType type)
Returns whether given node type can run on thisNodeType
childNodeType()
List<NodeType>
childNodeTypes()
String
description()
NodeType
hostType()
Returns the host type of thisboolean
isConfigServerHostLike()
either config server host or controller hostboolean
isConfigServerLike()
either config server or controllerboolean
isHost()
boolean
isSharable()
Returns whether this supports host sharingstatic NodeType
valueOf(String name)
Returns the enum constant of this type with the specified name.static NodeType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
tenant
public static final NodeType tenant
Node assignable to a tenant to run application workloads
-
host
public static final NodeType host
Host of a tenant nodes
-
proxy
public static final NodeType proxy
Node serving the shared proxy layer
-
proxyhost
public static final NodeType proxyhost
Host of a proxy node
-
config
public static final NodeType config
Config server node
-
confighost
public static final NodeType confighost
Host of a config server node
-
controller
public static final NodeType controller
Controller node
-
controllerhost
public static final NodeType controllerhost
Host of a controller node
-
-
Method Detail
-
values
public static NodeType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NodeType c : NodeType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NodeType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isHost
public boolean isHost()
-
isConfigServerLike
public boolean isConfigServerLike()
either config server or controller
-
isConfigServerHostLike
public boolean isConfigServerHostLike()
either config server host or controller host
-
isSharable
public boolean isSharable()
Returns whether this supports host sharing
-
description
public String description()
-
childNodeType
public NodeType childNodeType()
- Returns:
NodeType
of the node(s) that run on this host- Throws:
IllegalStateException
- if this type is not a host
-
childNodeTypes
public List<NodeType> childNodeTypes()
- Returns:
- all
NodeType
s that can run on this host - Throws:
IllegalStateException
- if this type is not a host
-
canRun
public boolean canRun(NodeType type)
Returns whether given node type can run on this
-
hostType
public NodeType hostType()
Returns the host type of this
-
-