+ /**
+ * Change the mapping status of a node in the grid and in its cluster.
+ * @param _g The node to change the mapping status
+ * @param _status The node's mapping status
+ */
+ public void setMappedStatus( GNode _g, boolean _status )
+ {
+ if( _g != null )
+ {
+ getClusterOfNode( _g ).setGNodeStatus( _g, _status ) ;
+
+ for( int i = 0 ; i < gnodesList.size() ; i++ )
+ {
+ if( _g.getId() == gnodesList.get( i ).getId() )
+ {
+ gnodesList.get( i ).setMapped( _status ) ;
+ break ;
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Search and return the cluster containing the specified node.
+ * @param _g A node
+ * @return The cluster containing the node
+ */
+ public Cluster getClusterOfNode( GNode _g )
+ {
+ if( _g != null )
+ {
+ for( int i = 0 ; i < clusters.size() ; i++ )
+ {
+ if( _g.getCluster().equalsIgnoreCase( clusters.get( i ).getName() ) )
+ {
+ return clusters.get( i ) ;
+ }
+ }
+ }
+
+ return null ;
+ }
+