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 ;
21 private boolean mapped ;
22 private boolean inCluster ;
23 private String cluster ;
28 * Default constructor.
46 * Set the cluster's name in which the computing node is.
47 * @param _c The name of the cluster containing the node
49 public void setCluster( String _c )
56 * Return the cluster's name in which the node is.
57 * @return The cluster's name
59 public String getCluster()
66 * Set the site's name in which the computing node is.
67 * @param _s The site's name
69 public void setSite( String _s )
76 * Return the name of the site in which the computing node is.
77 * @return The site's name
79 public String getSite()
86 * Change the status of the node concerning its participation in the computation.
87 * @param _b The status of its participation
89 public void setMapped( boolean _b )
96 * Return the status of the participation of the computing node.
97 * @return The status of the node
99 public boolean getMapped()
106 * Set the status of the computing node in order to know if
107 * it is in cluster or not.
108 * @param _b The status of the node
110 public void setInCluster( boolean _b )
117 * Return the status of the computing node concerning its
118 * presence, or not, in a cluster.
119 * @return The status of the node
121 public boolean getInCluster()
128 * Set the name of the computing node.
129 * @param _name The node's name
131 public void setName( String _name )
138 * Return the name of the computing node
139 * @return The node's name
141 public String getName()
148 * Set the external representation of the node. This object
149 * represents the node in application using this library.
150 * @param n The external representation of the node
152 public void setNode( Object n )
159 * Return the external representation of the node.
160 * @return The external representation of the node
162 public Object getNode()
170 * Set the amount of computing cores of the computing node.
171 * @param _nb_cores The amount of cores
173 public void setNb_cores( int _nb_cores )
175 nb_cores = _nb_cores;
180 * Return the amount of computing cores of the computing node.
181 * @return The amount of cores
183 public int getNb_cores()
190 * Set the frequency of computing cores of the computing node.
191 * @param _freq The frequency of cores
193 public void setFrequency( int _freq )
200 * Return the frequency of computing cores of the computing node.
201 * @return The frequency of cores
203 public int getFrequency()
210 * Set the amount of available memory of the computing node.
211 * @param _mem Amount of memory
213 public void setMemory( int _mem )
220 * Return the amount of the available memory of the computing node.
221 * @return The amount of memory
223 public int getMemory()
230 * Return the computational power of the computing node. It includes
231 * the multiplication of cores by frequency plus a coefficient for the
233 * @return The computational power of the computing node
235 public int getPower()
237 return ( nb_cores * frequency ) ;
242 * Set the uniq identifier of the computing node.
243 * @param _id The identifier of the node
245 public void setId( long _id )
252 * Return the uniq identifier of the computing node.
253 * @return The identifier of the node
262 /** La programmation est un art, respectons ceux qui la pratiquent !! **/