Interface Node
- All Superinterfaces:
org.jvnet.hk2.config.ConfigBeanProxy,org.glassfish.api.admin.config.Named,jakarta.validation.Payload,RefContainer,org.glassfish.api.admin.config.ReferenceContainer
public interface Node
extends org.jvnet.hk2.config.ConfigBeanProxy, org.glassfish.api.admin.config.Named, org.glassfish.api.admin.config.ReferenceContainer, RefContainer, jakarta.validation.Payload
A cluster defines a homogeneous set of server instances that share the same
applications, resources, and configuration.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionCheck if node is frozen and we should not allow new instances to be created on the node.Points to a GlassFish installation root.default StringReturns the install dir with separators as forward slashes.@Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\.;]*",message="{node.invalid.name}",payload=Node.class) StringgetName()Points to the parent directory of the node(s) directory.default StringReturns the node dir as an absolute path.default Stringdefault StringReturns the node dir with separators as forward slashes.@Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\./;#]*",message="{nodehost.invalid.name}",payload=Node.class) StringPoints to a named host.getType()@Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\./;#]*",message="{windowsdomain.invalid.name}",payload=Node.class) StringSpecifies the Windows domain if applicabledefault booleanDoes the node allow instance creation?default booleanTrue if this is the default local node.default booleanisLocal()True if the node'snodeHostis local to this.default booleanIs a node being used by any server instance?voidSets the value of thefreezeproperty.voidsetInstallDir(String installDir) Sets the value ofinstall-dir, the GlassFish installation root.voidSets the nodename.voidsetNodeDir(String nodeDir) Sets the value of thenode-dir, top-level parent directory of node(s).voidsetNodeHost(String nodeHost) Sets the value of thenodeHostproperty.voidsetSshConnector(SshConnector connector) voidSets the value oftypeof this node.voidsetWindowsDomain(String windowsDomain) Sets the value of the Windows domain property.Methods inherited from interface org.jvnet.hk2.config.ConfigBeanProxy
createChild, deepCopy, getParent, getParentMethods inherited from interface com.sun.enterprise.config.serverbeans.RefContainer
getApplicationRef, getApplicationRefNames, getResourceRef, getResourceRefNamesMethods inherited from interface org.glassfish.api.admin.config.ReferenceContainer
getReference, isCluster, isDas, isInstance, isServer
-
Method Details
-
setName
Sets the nodename.- Specified by:
setNamein interfaceorg.glassfish.api.admin.config.Named- Parameters:
name- node name- Throws:
PropertyVetoException- if a listener vetoes the change
-
getName
@Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\.;]*", message="{node.invalid.name}", payload=Node.class) @Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\.;]*",message="{node.invalid.name}",payload=Node.class) String getName()- Specified by:
getNamein interfaceorg.glassfish.api.admin.config.Named
-
getNodeDir
String getNodeDir()Points to the parent directory of the node(s) directory.- Returns:
- path location of
node-dir
-
setNodeDir
Sets the value of thenode-dir, top-level parent directory of node(s).- Parameters:
nodeDir- allowed object isString- Throws:
PropertyVetoException- if a listener vetoes the change
-
getNodeHost
@Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\./;#]*", message="{nodehost.invalid.name}", payload=Node.class) @Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\./;#]*",message="{nodehost.invalid.name}",payload=Node.class) String getNodeHost()Points to a named host.- Returns:
- a named host name
-
setNodeHost
Sets the value of thenodeHostproperty.- Parameters:
nodeHost- allowed object isString- Throws:
PropertyVetoException- if a listener vetoes the change
-
getInstallDir
String getInstallDir()Points to a GlassFish installation root.- Returns:
- value of
install-dir
-
setInstallDir
Sets the value ofinstall-dir, the GlassFish installation root.- Parameters:
installDir- allowed object isString- Throws:
PropertyVetoException- if a listener vetoes the change
-
getType
String getType() -
setType
Sets the value oftypeof this node.- Parameters:
type- allowed object isString- Throws:
PropertyVetoException- if a listener vetoes the change
-
getWindowsDomain
@Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\./;#]*", message="{windowsdomain.invalid.name}", payload=Node.class) @Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\./;#]*",message="{windowsdomain.invalid.name}",payload=Node.class) String getWindowsDomain()Specifies the Windows domain if applicable- Returns:
- the Windows domain name.
-
setWindowsDomain
Sets the value of the Windows domain property.- Parameters:
windowsDomain- allowed object isString- Throws:
PropertyVetoException- if a listener vetoes the change
-
getFreeze
String getFreeze()Check if node is frozen and we should not allow new instances to be created on the node.- Returns:
trueif node is frozen
-
setFreeze
Sets the value of thefreezeproperty.- Parameters:
freeze-trueto freeze node and not allow instances to be created- Throws:
PropertyVetoException- if a listener vetoes the change
-
getSshConnector
SshConnector getSshConnector() -
setSshConnector
-
getInstallDirUnixStyle
Returns the install dir with separators as forward slashes.This is needed to run commands over SSH tools on Windows where the backslashes are interpreted as escape chars.
- Returns:
- the install dir with separators as forward slashes
-
getNodeDirUnixStyle
Returns the node dir with separators as forward slashes.This is needed to run commands over SSH tools on Windows where the backslashes are interpreted as escape chars.
- Returns:
- the node dir with separators as forward slashes
-
getNodeDirAbsolute
Returns the node dir as an absolute path.If the node dir path in the
nodeelement is relative this will make it absolute relative to the node's installdir.- Returns:
- the node's
nodeDiras an absolute path,nullif no nodedir.
-
getNodeDirAbsoluteUnixStyle
-
nodeInUse
default boolean nodeInUse()Is a node being used by any server instance?- Returns:
- true if node is referenced by any server instance, else false.
-
isDefaultLocalNode
default boolean isDefaultLocalNode()True if this is the default local node.Example:
localhost-domain1.- Returns:
trueif this is the default local node,falseotherwise
-
isLocal
default boolean isLocal()True if the node'snodeHostis local to this.- Returns:
trueif the node's host is local to this,falseotherwise
-
instanceCreationAllowed
default boolean instanceCreationAllowed()Does the node allow instance creation?- Returns:
trueif node allows instance creation, elsefalse
-