3 import java.io.Serializable;
7 * Class representing a computing node
8 * @author Sébastien Miquée
11 public class GNode implements Serializable
13 private static final long serialVersionUID = 1L;
16 private int nb_cores ;
17 private int frequency ;
22 private boolean mapped ;
23 private boolean inCluster ;
24 private String cluster ;
29 * Default constructor.
48 * Set the cluster's name in which the computing node is.
49 * @param _c The name of the cluster containing the node
51 public void setCluster( String _c )
58 * Return the cluster's name in which the node is.
59 * @return The cluster's name
61 public String getCluster()
68 * Set the site's name in which the computing node is.
69 * @param _s The site's name
71 public void setSite( String _s )
78 * Return the name of the site in which the computing node is.
79 * @return The site's name
81 public String getSite()
88 * Change the status of the node concerning its participation in the computation.
89 * @param _b The status of its participation
91 public void setMapped( boolean _b )
98 * Return the status of the participation of the computing node.
99 * @return The status of the node
101 public boolean getMapped()
108 * Set the status of the computing node in order to know if
109 * it is in cluster or not.
110 * @param _b The status of the node
112 public void setInCluster( boolean _b )
119 * Return the status of the computing node concerning its
120 * presence, or not, in a cluster.
121 * @return The status of the node
123 public boolean getInCluster()
130 * Set the name of the computing node.
131 * @param _name The node's name
133 public void setName( String _name )
140 * Return the name of the computing node
141 * @return The node's name
143 public String getName()
150 * Set the external representation of the node. This object
151 * represents the node in application using this library.
152 * @param n The external representation of the node
154 public void setNode( Object n )
161 * Return the external representation of the node.
162 * @return The external representation of the node
164 public Object getNode()
172 * Set the amount of computing cores of the computing node.
173 * @param _nb_cores The amount of cores
175 public void setNb_cores( int _nb_cores )
177 nb_cores = _nb_cores;
182 * Return the amount of computing cores of the computing node.
183 * @return The amount of cores
185 public int getNb_cores()
192 * Set the frequency of computing cores of the computing node.
193 * @param _freq The frequency of cores
195 public void setFrequency( int _freq )
202 * Return the frequency of computing cores of the computing node.
203 * @return The frequency of cores
205 public int getFrequency()
212 * Set the MFlops of each computing core of the computing node.
213 * @param _freq The MFlops of cores
215 public void setMFlops( int _mflops )
222 * Return the MFlops of each computing core of the computing node.
223 * @return The MFlops of cores
225 public int getMFlops()
231 * Set the amount of available memory of the computing node.
232 * @param _mem Amount of memory
234 public void setMemory( int _mem )
241 * Return the amount of the available memory of the computing node.
242 * @return The amount of memory
244 public int getMemory()
251 * Return the computational power of the computing node. It includes
252 * the multiplication of cores by frequency plus a coefficient for the
254 * @return The computational power of the computing node
256 public int getPower()
260 return ( nb_cores * frequency ) ;
262 return ( nb_cores * mflops ) ;
268 * Set the uniq identifier of the computing node.
269 * @param _id The identifier of the node
271 public void setId( long _id )
278 * Return the uniq identifier of the computing node.
279 * @return The identifier of the node
288 * Return the name of the node for the use of the node in a string.
289 * @return The name of the node
291 public String toString()
298 /** La programmation est un art, respectons ceux qui la pratiquent !! **/