dataminer-pool-manager/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/datamodel/Cluster.java

83 lines
1.6 KiB
Java
Executable File

package org.gcube.dataanalysis.dataminer.poolmanager.datamodel;
import java.util.Collection;
import java.util.Vector;
public class Cluster ***REMOVED***
/**
* The set of hosts belonging to the cluster.
*/
private Collection<Host> hosts;
/**
* A name for this cluster.
*/
private String name;
/**
* A description of this cluster.
*/
private String description;
/**
* The set of algorithms deployed on this cluster (i.e. on all its hosts)
*/
private Collection<AlgorithmSet> algoSets;
public Cluster()
***REMOVED***
this.hosts = new Vector<>();
this.algoSets = new Vector<>();
***REMOVED***
public void addAlgorithmSet(AlgorithmSet set)
***REMOVED***
this.algoSets.add(set);
***REMOVED***
public void addHost(Host host)
***REMOVED***
this.hosts.add(host);
***REMOVED***
public Collection<Host> getHosts()
***REMOVED***
return hosts;
***REMOVED***
public String getName()
***REMOVED***
return name;
***REMOVED***
public void setName(String name)
***REMOVED***
this.name = name;
***REMOVED***
public String getDescription()
***REMOVED***
return description;
***REMOVED***
public void setDescription(String description)
***REMOVED***
this.description = description;
***REMOVED***
public Collection<AlgorithmSet> getAlgorithmSets()
***REMOVED***
return algoSets;
***REMOVED***
public String toString() ***REMOVED***
String out = "Cluster: "+this.name+"\n";
for(Host h:this.getHosts()) ***REMOVED***
out+=" "+h+"\n";
***REMOVED***
return out;
***REMOVED***
***REMOVED***