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 ;
30 * Default constructor.
49 * Set the cluster's name in which the computing node is.
50 * @param _c The name of the cluster containing the node
52 public void setCluster( String _c )
59 * Return the cluster's name in which the node is.
60 * @return The cluster's name
62 public String getCluster()
69 * Set the site's name in which the computing node is.
70 * @param _s The site's name
72 public void setSite( String _s )
79 * Return the name of the site in which the computing node is.
80 * @return The site's name
82 public String getSite()
89 * Change the status of the node concerning its participation in the computation.
90 * @param _b The status of its participation
92 public void setMapped( boolean _b )
99 * Return the status of the participation of the computing node.
100 * @return The status of the node
102 public boolean getMapped()
109 * Set the status of the computing node in order to know if
110 * it is in cluster or not.
111 * @param _b The status of the node
113 public void setInCluster( boolean _b )
120 * Return the status of the computing node concerning its
121 * presence, or not, in a cluster.
122 * @return The status of the node
124 public boolean getInCluster()
131 * Set the name of the computing node.
132 * @param _name The node's name
134 public void setName( String _name )
141 * Return the name of the computing node
142 * @return The node's name
144 public String getName()
151 * Set the external representation of the node. This object
152 * represents the node in application using this library.
153 * @param n The external representation of the node
155 public void setNode( Object n )
162 * Return the external representation of the node.
163 * @return The external representation of the node
165 public Object getNode()
173 * Set the amount of computing cores of the computing node.
174 * @param _nb_cores The amount of cores
176 public void setNb_cores( int _nb_cores )
178 nb_cores = _nb_cores;
183 * Return the amount of computing cores of the computing node.
184 * @return The amount of cores
186 public int getNb_cores()
193 * Set the frequency of computing cores of the computing node.
194 * @param _freq The frequency of cores
196 public void setFrequency( int _freq )
203 * Return the frequency of computing cores of the computing node.
204 * @return The frequency of cores
206 public int getFrequency()
213 * Set the MFlops of each computing core of the computing node.
214 * @param _mflops The MFlops of cores
216 public void setMFlops( int _mflops )
223 * Return the MFlops of each computing core of the computing node.
224 * @return The MFlops of cores
226 public int getMFlops()
232 * Set the amount of available memory of the computing node.
233 * @param _mem Amount of memory
235 public void setMemory( int _mem )
242 * Return the amount of the available memory of the computing node.
243 * @return The amount of memory
245 public int getMemory()
252 * Return the computational power of the computing node. It includes
253 * the multiplication of cores by frequency plus a coefficient for the
255 * @return The computational power of the computing node
257 public int getPower()
261 return ( nb_cores * frequency ) ;
263 return ( nb_cores * mflops ) ;
269 * Set the uniq identifier of the computing node.
270 * @param _id The identifier of the node
272 public void setId( long _id )
279 * Return the uniq identifier of the computing node.
280 * @return The identifier of the node
289 * Return the name of the node for the use of the node in a string.
290 * @return The name of the node
292 public String toString()
299 * Return the IP address of the GNode.
300 * @return The IP address
302 public String getIP()
309 * Set the IP address of the GNode.
310 * @param _ip The IP address
312 public void setIP( String _ip )
319 /** La programmation est un art, respectons ceux qui la pratiquent !! **/