Author: mrogers
Date: 2006-09-14 14:13:25 +0000 (Thu, 14 Sep 2006)
New Revision: 10468
Modified:
trunk/apps/load-balancing-sims/phase6/messages/ChkRequest.java
Log:
CHK inserts, sorry about the large number of commits, I accidentally added
classfiles to the repository and I'm trying to fix it
Modified: trunk/apps/load-balancing-sims/phase6/messages/ChkRequest.java
===================================================================
--- trunk/apps/load-balancing-sims/phase6/messages/ChkRequest.java
2006-09-14 14:13:22 UTC (rev 10467)
+++ trunk/apps/load-balancing-sims/phase6/messages/ChkRequest.java
2006-09-14 14:13:25 UTC (rev 10468)
@@ -1,37 +1,21 @@
package messages;
-public class ChkRequest extends Message
+public class ChkRequest extends Search
{
- public final static int MAX_HTL = 5; // Maximum amount of backtracking
-
- private static int nextId = 0;
-
- public final int key; // The requested key
- public double best; // The best location seen so far
- public int htl; // Hops to live for backtracking
-
// Start a new request
public ChkRequest (int key, double location)
{
- id = nextId++;
- this.key = key;
- best = location;
- htl = MAX_HTL;
- size = Message.HEADER_SIZE + Message.KEY_SIZE;
+ super (key, location);
}
// Forward a request
- public ChkRequest (int id, int key, double best, int htl)
+ public ChkRequest (int id, int key, double closest, int htl)
{
- this.id = id;
- this.key = key;
- this.best = best;
- this.htl = htl;
- size = Message.HEADER_SIZE + Message.KEY_SIZE;
+ super (id, key, closest, htl);
}
public String toString()
{
- return new String ("CHK request (" + id + "," + key + ")");
+ return new String ("CHK request (" +id+ "," +key+ "," +htl+")");
}
}