diff --git a/src/c2c/dht/SecureJoinReq.java b/src/c2c/dht/SecureJoinReq.java index a4baf9c..9dd41be 100644 --- a/src/c2c/dht/SecureJoinReq.java +++ b/src/c2c/dht/SecureJoinReq.java @@ -17,17 +17,20 @@ public SecureJoinReq(InputBuffer buffer) throws QSException { password = buffer.nextString(); } + @Override public void serialize(OutputBuffer buffer) { super.serialize(buffer); buffer.add(password); } + @Override public Object clone() throws CloneNotSupportedException { SecureJoinReq result = (SecureJoinReq) super.clone(); result.password = password; return result; } + @Override public String toString() { StringBuffer result = new StringBuffer(super.toString()); result.append(" password="); diff --git a/src/c2c/dht/SecuredRouter.java b/src/c2c/dht/SecuredRouter.java index 2fabe7e..63087cc 100644 --- a/src/c2c/dht/SecuredRouter.java +++ b/src/c2c/dht/SecuredRouter.java @@ -16,13 +16,15 @@ public SecuredRouter() throws Exception { super(); } - public void init (ConfigDataIF config) throws Exception { + @Override + public void init (ConfigDataIF config) throws Exception { super.init(config); join_password = config_get_string(config, "join_password"); accept_password = config_get_string(config, "accept_password"); joinAlarm = new bamboo.util.Curry.Thunk3() { - public void run(Integer tries, Integer period, Integer revTTL) { + @Override + public void run(Integer tries, Integer period, Integer revTTL) { if (! initialized) { tries = new Integer(tries.intValue() + 1); revTTL = new Integer(revTTL.intValue() + 1); @@ -42,7 +44,8 @@ public void run(Integer tries, Integer period, Integer revTTL) { } }; partitionCheckAlarm = new Runnable() { - public void run() { + @Override + public void run() { if (down_nodes.size () > 0) { int which = rand.nextInt (down_nodes.size ()); Iterator i = down_nodes.iterator (); @@ -69,7 +72,8 @@ public void run() { } }; ready = new Runnable() { - public void run() { + @Override + public void run() { network = Network.instance(my_node_id); vivaldi = Vivaldi.instance(my_node_id); rpc = Rpc.instance(my_node_id); @@ -164,7 +168,8 @@ protected void handle_secure_join_req(SecureJoinReq req) { req.inbound = false; req.comp_q = my_sink; req.user_data = new RecursiveRouteCB (next_hop, - new Runnable() { public void run() { handleEvent(orig); }}); + new Runnable() { @Override + public void run() { handleEvent(orig); }}); req.timeout_sec = 5; dispatch (req); } @@ -174,7 +179,8 @@ protected void handle_secure_join_req(SecureJoinReq req) { } } - public void handleEvent(QueueElementIF item) { + @Override + public void handleEvent(QueueElementIF item) { //logger.info("SecuredRouter.handleEvent()"); if (item instanceof PingMsg) { handle_ping_msg((PingMsg) item); diff --git a/src/c2c/payloads/IntermediateKeyValue.java b/src/c2c/payloads/IntermediateKeyValue.java index eef348d..037cb5e 100644 --- a/src/c2c/payloads/IntermediateKeyValue.java +++ b/src/c2c/payloads/IntermediateKeyValue.java @@ -1,8 +1,5 @@ package c2c.payloads; -import ostore.util.OutputBuffer; -import ostore.util.QuickSerializable; - public class IntermediateKeyValue { public final KeyPayload key; public final Value value; diff --git a/src/c2c/stages/ClientStage.java b/src/c2c/stages/ClientStage.java index 2d380fa..4423152 100644 --- a/src/c2c/stages/ClientStage.java +++ b/src/c2c/stages/ClientStage.java @@ -7,9 +7,6 @@ import java.io.IOException; import java.io.OutputStreamWriter; import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.List; - import org.apache.log4j.Level; import org.apache.log4j.Logger;