package jaceP2P;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
import java.util.Vector;
+import and.Mapping.*;
public class TokenThread extends Thread {
int nbLocal = Register.Instance().getSize();
int totalDaemons;
Vector liste = SuperNodeListe.Instance().getListe();
+
+ /******* Sébastien Miquée ********/
+ ArrayList<GNode> gnodes = null ;
+ try {
+ gnodes = SuperNodeListe.Instance().getStubOf(LocalHost.Instance().getIP()).getGNodes() ;
+ } catch (RemoteException e1) {
+ System.err.println( "Unable to retrieve local gnodes list !" ) ;
+ e1.printStackTrace();
+ }
+
synchronized (SuperNodeListe.Instance()) {
synchronized (Register.Instance()) {
if (nbLocal > 5) {
newVector.add(nodes.elementAt(j));
}
((SuperNodeData) liste.get(i)).getStub()
- .sendSurplus(newVector);
+ .sendSurplus(newVector, gnodes);
for (int j = 0; j < amountToSend; j++)
nodes.remove(0);
int index = SuperNodeListe.Instance()