Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ran Eclipse clean-up wizard
  • Loading branch information
Caleb Perkins committed Apr 20, 2012
1 parent 4c4e8a6 commit fc132ef
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
3 changes: 3 additions & 0 deletions src/c2c/dht/SecureJoinReq.java
Expand Up @@ -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=");
Expand Down
18 changes: 12 additions & 6 deletions src/c2c/dht/SecuredRouter.java
Expand Up @@ -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<Integer,Integer,Integer>() {
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);
Expand All @@ -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<NodeId> i = down_nodes.iterator ();
Expand All @@ -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);
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions 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;
Expand Down
3 changes: 0 additions & 3 deletions src/c2c/stages/ClientStage.java
Expand Up @@ -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;

Expand Down

0 comments on commit fc132ef

Please sign in to comment.