mirror of
https://github.com/ChronosX88/KademliaDHT.git
synced 2024-11-21 17:52:21 +00:00
Few minor updates and removal of completed @todos
This commit is contained in:
parent
41fb630515
commit
67c12438d1
@ -41,8 +41,6 @@ import kademlia.util.serializer.JsonSerializer;
|
||||
*
|
||||
* @todo When we receive a store message - if we have a newer version of the content, re-send this newer version to that node so as to update their version
|
||||
* @todo Handle IPv6 Addresses
|
||||
* @todo Handle compressing data
|
||||
* @todo Implement Kademlia.ping() operation.
|
||||
*
|
||||
*/
|
||||
public class Kademlia
|
||||
|
@ -101,7 +101,7 @@ public class DHT
|
||||
}
|
||||
catch (ContentNotFoundException ex)
|
||||
{
|
||||
/* @todo Log an error here */
|
||||
/* This won't ever happen at this point since we only get here if the content is found, lets ignore it */
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -128,7 +128,11 @@ public class DHT
|
||||
}
|
||||
catch (ContentExistException e)
|
||||
{
|
||||
/* @todo Content already exist on the DHT, log an error here */
|
||||
/**
|
||||
* Content already exist on the DHT
|
||||
* This won't happen because above takes care of removing the content if it's older and needs to be updated,
|
||||
* or returning if we already have the current content version.
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,9 @@ public class StoreContentReceiver implements Receiver
|
||||
@Override
|
||||
public void timeout(int comm)
|
||||
{
|
||||
/* @todo Do something if the request times out */
|
||||
/**
|
||||
* This receiver only handles Receiving content when we've received the message,
|
||||
* so no timeout will happen with this receiver.
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
@ -1,36 +1,39 @@
|
||||
///**
|
||||
// * @author Joshua Kissoon
|
||||
// * @created 20140218
|
||||
// * @desc Implementation of the Kademlia Ping operation
|
||||
// */
|
||||
//package kademlia.operation;
|
||||
//
|
||||
//import kademlia.core.KadServer;
|
||||
//import kademlia.node.Node;
|
||||
//
|
||||
//public class PingOperation implements Operation
|
||||
//{
|
||||
//
|
||||
// private final KadServer server;
|
||||
// private final Node localNode;
|
||||
// private final Node toPing;
|
||||
//
|
||||
// /**
|
||||
// * @param server The Kademlia server used to send & receive messages
|
||||
// * @param local The local node
|
||||
// * @param toPing The node to send the ping message to
|
||||
// */
|
||||
// public PingOperation(KadServer server, Node local, Node toPing)
|
||||
// {
|
||||
// this.server = server;
|
||||
// this.localNode = local;
|
||||
// this.toPing = toPing;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Object execute()
|
||||
// {
|
||||
// /* @todo Create a pingmessage and send this message to the toPing node,
|
||||
// then handle the reply from this node using a reciever */
|
||||
// }
|
||||
//}
|
||||
/**
|
||||
* Implementation of the Kademlia Ping operation,
|
||||
* This is on hold at the moment since I'm not sure if we'll use ping given the improvements mentioned in the paper.
|
||||
*
|
||||
* @author Joshua Kissoon
|
||||
* @since 20140218
|
||||
*/
|
||||
package kademlia.operation;
|
||||
|
||||
import java.io.IOException;
|
||||
import kademlia.core.KadServer;
|
||||
import kademlia.exceptions.RoutingException;
|
||||
import kademlia.node.Node;
|
||||
|
||||
public class PingOperation implements Operation
|
||||
{
|
||||
|
||||
private final KadServer server;
|
||||
private final Node localNode;
|
||||
private final Node toPing;
|
||||
|
||||
/**
|
||||
* @param server The Kademlia server used to send & receive messages
|
||||
* @param local The local node
|
||||
* @param toPing The node to send the ping message to
|
||||
*/
|
||||
public PingOperation(KadServer server, Node local, Node toPing)
|
||||
{
|
||||
this.server = server;
|
||||
this.localNode = local;
|
||||
this.toPing = toPing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() throws IOException, RoutingException
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user