private long id ;
private boolean mapped ;
private boolean inCluster ;
- private String cluster ;
- private String site ;
+ private String clusterName ;
+ private String siteName ;
private String ip ;
+ private Cluster cluster ;
/**
public GNode()
{
name = "" ;
- cluster = "" ;
- site = "" ;
+ clusterName = "" ;
+ siteName = "" ;
nb_cores = 0 ;
frequency = 0 ;
mflops = 0 ;
id = -1 ;
mapped = false ;
inCluster = false ;
+ cluster = null ;
+ }
+
+
+ public void setCluster( Cluster _cl )
+ {
+ cluster = _cl ;
+ }
+
+ public Cluster getCluster()
+ {
+ return cluster ;
}
* Set the cluster's name in which the computing node is.
* @param _c The name of the cluster containing the node
*/
- public void setCluster( String _c )
+ public void setClusterName( String _cn )
{
- cluster = _c ;
+ clusterName = _cn ;
}
* Return the cluster's name in which the node is.
* @return The cluster's name
*/
- public String getCluster()
+ public String getClusterName()
{
- return cluster ;
+ return clusterName ;
}
* Set the site's name in which the computing node is.
* @param _s The site's name
*/
- public void setSite( String _s )
+ public void setSiteName( String _s )
{
- site = _s ;
+ siteName = _s ;
}
* Return the name of the site in which the computing node is.
* @return The site's name
*/
- public String getSite()
+ public String getSiteName()
{
- return site ;
+ return siteName ;
}
ip = _ip ;
}
+
+ /**
+ * Construct and return a copy of the current GNode.
+ * @return A copy of this node
+ */
+ public GNode clone()
+ {
+ GNode copy = new GNode() ;
+
+ copy.setName( name ) ;
+ copy.setNb_cores( nb_cores ) ;
+ copy.setFrequency( frequency ) ;
+ copy.setMFlops( mflops ) ;
+ copy.setMemory( memory ) ;
+ copy.setNode( node ) ;
+ copy.setId( id ) ;
+ copy.setMapped( mapped ) ;
+ copy.setInCluster( inCluster ) ;
+ copy.setClusterName( clusterName ) ;
+ copy.setSiteName( siteName ) ;
+ copy.setIP( ip ) ;
+
+ return copy ;
+ }
+
}
/** La programmation est un art, respectons ceux qui la pratiquent !! **/