Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move recently added getters after the constuctors
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 29 Jun 2016 07:35:32 +0000 (09:35 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 29 Jun 2016 07:35:32 +0000 (09:35 +0200)
examples/java/dht/chord/ChordTask.java
examples/java/dht/chord/FindSuccessorAnswerTask.java
examples/java/dht/chord/FindSuccessorTask.java
examples/java/dht/chord/GetPredecessorAnswerTask.java
examples/java/dht/chord/NotifyTask.java

index e43fc8b..e17a19b 100644 (file)
@@ -16,6 +16,12 @@ public class ChordTask extends Task {
     this(null,null);
   }
 
+  public ChordTask(String issuerHostName, String answerTo) {
+         super(null, Common.COMP_SIZE, Common.COMM_SIZE);
+         this.issuerHostName = issuerHostName;
+         this.answerTo = answerTo;
+  }
+
   public String getIssuerHostName(){
     return this.issuerHostName;
   }
@@ -23,10 +29,4 @@ public class ChordTask extends Task {
   public String getAnswerTo(){
     return this.answerTo;
   }
-
-  public ChordTask(String issuerHostName, String answerTo) {
-    super(null, Common.COMP_SIZE, Common.COMM_SIZE);
-    this.issuerHostName = issuerHostName;
-    this.answerTo = answerTo;
-  }
 }
index 9d2440a..cac37b8 100644 (file)
@@ -8,12 +8,13 @@ package dht.chord;
 
 public class FindSuccessorAnswerTask extends ChordTask {
   private int answerId;
-  public int getAnswerId(){
-    return this.answerId;
-  }
 
   public FindSuccessorAnswerTask(String issuerHostname, String answerTo, int answerId) {
     super(issuerHostname,answerTo);
     this.answerId = answerId;
   }
+
+  public int getAnswerId(){
+    return this.answerId;
+  }
 }
index a16d9ca..66fb7d7 100644 (file)
@@ -9,12 +9,12 @@ package dht.chord;
 public class FindSuccessorTask extends ChordTask {
   private int requestId;
 
-  public int getRequestId(){
-    return this.requestId;
-  }
-
   public FindSuccessorTask(String issuerHostname, String answerTo,  int requestId) {
     super(issuerHostname, answerTo);
     this.requestId = requestId;
   }
+
+  public int getRequestId(){
+    return this.requestId;
+  }
 }
index d9ff5c8..8ed7ec1 100644 (file)
@@ -9,12 +9,12 @@ package dht.chord;
 public class GetPredecessorAnswerTask extends ChordTask {
   private int answerId;
 
-  public int getAnswerId(){
-    return this.answerId;
-  }
-
   public GetPredecessorAnswerTask(String issuerHostname, String answerTo, int answerId) {
     super(issuerHostname,answerTo);
     this.answerId = answerId;
   }
+
+  public int getAnswerId(){
+    return this.answerId;
+  }
 }
index fcc580a..88a9bbf 100644 (file)
@@ -8,12 +8,13 @@ package dht.chord;
 
 public class NotifyTask extends ChordTask {
   private int requestId;
-  public int getRequestId(){
-    return this.requestId;
-  }
 
   public NotifyTask(String issuerHostname, String answerTo, int requestId) {
     super(issuerHostname, answerTo);
     this.requestId = requestId;
   }
+
+  public int getRequestId(){
+    return this.requestId;
+  }
 }