public class ClusterDescription extends Object
Constructor and Description |
---|
ClusterDescription()
Constructor
|
ClusterDescription(JsonObject json)
Constructor (from JSON representation)
|
ClusterDescription(String clusterId,
Node controller,
List<Node> nodes)
Constructor
|
Modifier and Type | Method and Description |
---|---|
ClusterDescription |
addNode(Node node)
Add a node belonging to this cluster to the current node list.
|
String |
getClusterId() |
Node |
getController() |
List<Node> |
getNodes() |
ClusterDescription |
setClusterId(String clusterId)
Set the cluster ID
|
ClusterDescription |
setController(Node controller)
Set the controller node.
|
ClusterDescription |
setNodes(List<Node> nodes)
Set the nodes belonging to this cluster
|
JsonObject |
toJson()
Convert object to JSON representation
|
String |
toString() |
public ClusterDescription()
public ClusterDescription(String clusterId, Node controller, List<Node> nodes)
clusterId
- The cluster ID.controller
- The controller node.nodes
- A collection of nodes belonging to this cluster.public ClusterDescription(JsonObject json)
json
- JSON representationpublic ClusterDescription setNodes(List<Node> nodes)
nodes
- the nodespublic ClusterDescription addNode(Node node)
node
- the node to addpublic Node getController()
public ClusterDescription setController(Node controller)
controller
- the controller nodepublic String getClusterId()
public ClusterDescription setClusterId(String clusterId)
clusterId
- public JsonObject toJson()
Copyright © 2023 Eclipse. All rights reserved.