com.jelastic.api.system.persistence.ClusterGroup Maven / Gradle / Ivy
The newest version!
/*Server class MD5: 8cfa722d493519b592fe81e925a05831*/
package com.jelastic.api.system.persistence;
import java.util.HashSet;
import java.util.Set;
import com.jelastic.api.core.orm.dao.AbstractEntity;
/**
* @name Jelastic API Client
* @version 8.11.2
* @copyright Jelastic, Inc.
*/
public class ClusterGroup extends AbstractEntity implements Cloneable {
public static final String CLUSTER_COLUMN = "clusterGroup";
private String name;
private AppNodes env;
private Set nodes = new HashSet();
public ClusterGroup(String name) {
this.name = name;
}
public ClusterGroup() {
}
public AppNodes getEnv() {
return env;
}
public void setEnv(AppNodes env) {
this.env = env;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Set getNodes() {
return nodes;
}
public void setNodes(Set nodes) {
this.nodes = nodes;
}
@Override
protected Object clone() {
return new ClusterGroup(this.name);
}
@Override
public String toString() {
String resp = "{id:" + getId() + ",envid:" + env.getId() + ",nodes[";
String strNodes = "";
for (SoftwareNode softwareNode : nodes) {
strNodes += "," + softwareNode.getId();
}
if (!strNodes.isEmpty()) {
resp += strNodes.substring(1);
}
resp += "]}";
return resp;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy