2017-03-03 19:10:02 +01:00
|
|
|
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;
|
|
|
|
|
2017-12-20 12:01:01 +01:00
|
|
|
public Cluster()
|
|
|
|
***REMOVED***
|
2017-03-03 19:10:02 +01:00
|
|
|
this.hosts = new Vector<>();
|
|
|
|
this.algoSets = new Vector<>();
|
|
|
|
***REMOVED***
|
|
|
|
|
2017-12-20 12:01:01 +01:00
|
|
|
public void addAlgorithmSet(AlgorithmSet set)
|
|
|
|
***REMOVED***
|
2017-03-03 19:10:02 +01:00
|
|
|
this.algoSets.add(set);
|
|
|
|
***REMOVED***
|
|
|
|
|
2017-12-20 12:01:01 +01:00
|
|
|
public void addHost(Host host)
|
|
|
|
***REMOVED***
|
2017-03-03 19:10:02 +01:00
|
|
|
this.hosts.add(host);
|
|
|
|
***REMOVED***
|
|
|
|
|
2017-12-20 12:01:01 +01:00
|
|
|
public Collection<Host> getHosts()
|
|
|
|
***REMOVED***
|
2017-03-03 19:10:02 +01:00
|
|
|
return hosts;
|
|
|
|
***REMOVED***
|
|
|
|
|
2017-12-20 12:01:01 +01:00
|
|
|
public String getName()
|
|
|
|
***REMOVED***
|
2017-03-03 19:10:02 +01:00
|
|
|
return name;
|
|
|
|
***REMOVED***
|
|
|
|
|
2017-12-20 12:01:01 +01:00
|
|
|
public void setName(String name)
|
|
|
|
***REMOVED***
|
2017-03-03 19:10:02 +01:00
|
|
|
this.name = name;
|
|
|
|
***REMOVED***
|
|
|
|
|
2017-12-20 12:01:01 +01:00
|
|
|
public String getDescription()
|
|
|
|
***REMOVED***
|
2017-03-03 19:10:02 +01:00
|
|
|
return description;
|
|
|
|
***REMOVED***
|
|
|
|
|
2017-12-20 12:01:01 +01:00
|
|
|
public void setDescription(String description)
|
|
|
|
***REMOVED***
|
2017-03-03 19:10:02 +01:00
|
|
|
this.description = description;
|
|
|
|
***REMOVED***
|
|
|
|
|
2017-12-20 12:01:01 +01:00
|
|
|
public Collection<AlgorithmSet> getAlgorithmSets()
|
|
|
|
***REMOVED***
|
2017-03-03 19:10:02 +01:00
|
|
|
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***
|