mirror of
https://github.com/ChronosX88/KademliaDHT.git
synced 2024-11-22 02:02: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 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 IPv6 Addresses
|
||||||
* @todo Handle compressing data
|
|
||||||
* @todo Implement Kademlia.ping() operation.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Kademlia
|
public class Kademlia
|
||||||
|
@ -101,7 +101,7 @@ public class DHT
|
|||||||
}
|
}
|
||||||
catch (ContentNotFoundException ex)
|
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)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,6 +49,9 @@ public class StoreContentReceiver implements Receiver
|
|||||||
@Override
|
@Override
|
||||||
public void timeout(int comm)
|
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
|
* Implementation of the Kademlia Ping operation,
|
||||||
// * @created 20140218
|
* This is on hold at the moment since I'm not sure if we'll use ping given the improvements mentioned in the paper.
|
||||||
// * @desc Implementation of the Kademlia Ping operation
|
*
|
||||||
// */
|
* @author Joshua Kissoon
|
||||||
//package kademlia.operation;
|
* @since 20140218
|
||||||
//
|
*/
|
||||||
//import kademlia.core.KadServer;
|
package kademlia.operation;
|
||||||
//import kademlia.node.Node;
|
|
||||||
//
|
import java.io.IOException;
|
||||||
//public class PingOperation implements Operation
|
import kademlia.core.KadServer;
|
||||||
//{
|
import kademlia.exceptions.RoutingException;
|
||||||
//
|
import kademlia.node.Node;
|
||||||
// private final KadServer server;
|
|
||||||
// private final Node localNode;
|
public class PingOperation implements Operation
|
||||||
// private final Node toPing;
|
{
|
||||||
//
|
|
||||||
// /**
|
private final KadServer server;
|
||||||
// * @param server The Kademlia server used to send & receive messages
|
private final Node localNode;
|
||||||
// * @param local The local node
|
private final Node toPing;
|
||||||
// * @param toPing The node to send the ping message to
|
|
||||||
// */
|
/**
|
||||||
// public PingOperation(KadServer server, Node local, Node toPing)
|
* @param server The Kademlia server used to send & receive messages
|
||||||
// {
|
* @param local The local node
|
||||||
// this.server = server;
|
* @param toPing The node to send the ping message to
|
||||||
// this.localNode = local;
|
*/
|
||||||
// this.toPing = toPing;
|
public PingOperation(KadServer server, Node local, Node toPing)
|
||||||
// }
|
{
|
||||||
//
|
this.server = server;
|
||||||
// @Override
|
this.localNode = local;
|
||||||
// public Object execute()
|
this.toPing = toPing;
|
||||||
// {
|
}
|
||||||
// /* @todo Create a pingmessage and send this message to the toPing node,
|
|
||||||
// then handle the reply from this node using a reciever */
|
@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