}
}
}
-
- public void removeGNode( GNode _g, int _mode )
+
+ public void removeGNode( GNode _g, int _mode, String _spawnerIP )
{
if( _g != null )
{
// if not me, I inform the other super nodes
remoteStub = d.getStub() ;
try {
- remoteStub.delGNodeFromList( (Node)_g.getNode(), _mode ) ;
+ remoteStub.delGNodeFromList( (Node)_g.getNode(), _mode, _spawnerIP ) ;
} catch( Exception e ) {
System.err.println( "Unable to remove GNode on SuperNode " + d.getIP() ) ;
}
}
}
- public void propagateReplaceNode( GNode _dead, GNode _remp )
+ public void propagateReplaceNode( GNode _dead, GNode _remp, String _spawnerIP )
{
if( _dead != null && _remp != null )
{
// if not me, I inform the other super nodes
remoteStub = d.getStub() ;
try {
- remoteStub.updateMappedNode( _dead, _remp ) ;
+ remoteStub.updateMappedNode( _dead, _remp, _spawnerIP ) ;
} catch( Exception e ) {
System.err.println( "Unable to propagate replacing node on SuperNode " + d.getIP() ) ;
}
}
}
+
+ /**
+ * Send to all SuperNode the deletion of a mapping algorithm.
+ * @param id The mapping algorithm's identifier
+ */
+ public void removeAlgo( String _id )
+ {
+ SuperNodeData d = null ;
+ JaceSuperNodeInterface remoteStub = null ;
+
+ for( int i = 0 ; i < liste.size() ; i++ )
+ {
+ d = (SuperNodeData) liste.elementAt( i ) ;
+ if( ! d.getIP().equals( LocalHost.Instance().getIP() ) )
+ {
+ // if not me, I inform the other super nodes
+ remoteStub = d.getStub() ;
+ try {
+ remoteStub.removeAlgo( _id, 1 ) ;
+ } catch( Exception e ) {
+ System.err.println( "Unable to propagate the mapping algorithm deletion " + d.getIP() ) ;
+ }
+ }
+ }
+ }
+
}