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 ;
}
/**
* Set the MFlops of each computing core of the computing node.
- * @param _freq The MFlops of cores
+ * @param _mflops The MFlops of cores
*/
public void setMFlops( int _mflops )
{
/**
* Return the computational power of the computing node. It includes
- * the multiplication of cores by frequency plus a coefficient for the
- * memory.
+ * the multiplication of cores by frequency.
* @return The computational power of the computing node
*/
public int getPower()
{
- if( frequency != 0 )
+ if( mflops != 0 )
{
- return ( nb_cores * frequency ) ;
- } else {
return ( nb_cores * mflops ) ;
+ } else {
+ return ( nb_cores * frequency ) ;
}
}
return name ;
}
+
+ /**
+ * Return the IP address of the GNode.
+ * @return The IP address
+ */
+ public String getIP()
+ {
+ return ip ;
+ }
+
+
+ /**
+ * Set the IP address of the GNode.
+ * @param _ip The IP address
+ */
+ public void setIP( String _ip )
+ {
+ 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 !! **/