Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Correction of some bugs and performance enhancement.
[jaceP2P.git] / src / jaceP2P / JaceSuperNode.java
index 5392cf9..f0e380d 100644 (file)
@@ -7,7 +7,7 @@ public class JaceSuperNode {
        final int NB_HEART_DECONNECT = 3;
        // attribute
        private int heartTime; // frequency of heartBeat
-       private int port = 1099; // par la suite, donner par fichier de conf
+       private int port = 1098; // par la suite, donner par fichier de conf
        private int timeBeforeKill; // wait for 3 non response of heartBeat to kill
                                                                // the Daemon
        String protocol;
@@ -75,17 +75,17 @@ public class JaceSuperNode {
                        next = index + 1;
                HeartBeatSNode.Instance().setServer(
                                ((SuperNodeData) SuperNodeListe.Instance().getListe()
-                                               .elementAt(next)).getStub());
+                                               .get(next)).getStub());
                if (index == 0)
                        previous = SuperNodeListe.Instance().getListe().size() - 1;
                else
                        previous = index - 1;
                System.out.println(index + " " + next + " " + previous);
                try {
-                       ((SuperNodeData) SuperNodeListe.Instance().getListe().elementAt(
+                       ((SuperNodeData) SuperNodeListe.Instance().getListe().get(
                                        previous)).getStub().updateHeart(
                                        ((SuperNodeData) SuperNodeListe.Instance().getListe()
-                                                       .elementAt(index)).getStub());
+                                                       .get(index)).getStub());
                } catch (Exception e) {
 
                        System.err