Package net.sf.basedb.opengrid.config
Class NodeConfig
public class NodeConfig extends AbstractLockable<NodeConfig>
Configuration settings related to a single node
in the cluster. So far, we are only interested in the
name of the node so that we can connect to it and
execute commands via SSH.
- Since:
- 1.0
- Author:
- nicklas
-
Field Summary
-
Constructor Summary
Constructors Constructor Description NodeConfig()
-
Method Summary
Modifier and Type Method Description org.json.simple.JSONObject
asJSONObject(JSONOptions options)
Get the configuration information as a JSON object.protected void
checkValid(boolean forLock)
Name is required.String
getName()
Get the name of the node.void
setName(String name)
Set the name of the node.Methods inherited from class net.sf.basedb.opengrid.config.AbstractLockable
checkLocked, isLocked, isValid, lock
-
Field Details
-
name
-
-
Constructor Details
-
NodeConfig
public NodeConfig()
-
-
Method Details
-
getName
Get the name of the node. -
setName
Set the name of the node.- Throws:
IllegalStateException
- If this instance has been locked
-
checkValid
protected void checkValid(boolean forLock)Name is required.- Overrides:
checkValid
in classAbstractLockable<NodeConfig>
- Parameters:
forLock
- If TRUE, the instance will be locked after validation
-
asJSONObject
Get the configuration information as a JSON object.
-