mirror of
https://github.com/ChronosX88/KademliaDHT.git
synced 2024-11-22 10:12:19 +00:00
Few renames and minor changes
This commit is contained in:
parent
6978a8023b
commit
bf3280f62e
@ -25,7 +25,7 @@ import kademlia.util.serializer.KadSerializer;
|
|||||||
public class DHT
|
public class DHT
|
||||||
{
|
{
|
||||||
|
|
||||||
private transient StorageEntryManager entriesManager;
|
private transient StoredContentManager entriesManager;
|
||||||
private transient KadSerializer<StorageEntry> serializer = null;
|
private transient KadSerializer<StorageEntry> serializer = null;
|
||||||
private transient KadConfiguration config;
|
private transient KadConfiguration config;
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ public class DHT
|
|||||||
*/
|
*/
|
||||||
public final void initialize()
|
public final void initialize()
|
||||||
{
|
{
|
||||||
entriesManager = new StorageEntryManager();
|
entriesManager = new StoredContentManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,7 +17,7 @@ import kademlia.node.NodeId;
|
|||||||
* @author Joshua Kissoon
|
* @author Joshua Kissoon
|
||||||
* @since 20140226
|
* @since 20140226
|
||||||
*/
|
*/
|
||||||
class StorageEntryManager
|
class StoredContentManager
|
||||||
{
|
{
|
||||||
|
|
||||||
private final Map<NodeId, List<StorageEntryMetadata>> entries;
|
private final Map<NodeId, List<StorageEntryMetadata>> entries;
|
@ -28,8 +28,6 @@ import kademlia.node.Node;
|
|||||||
*
|
*
|
||||||
* @author Joshua Kissoon
|
* @author Joshua Kissoon
|
||||||
* @since 20140226
|
* @since 20140226
|
||||||
*
|
|
||||||
* @todo When we've retrieved the required amount of versions of the content, stop the operation
|
|
||||||
*/
|
*/
|
||||||
public class ContentLookupOperation implements Operation, Receiver
|
public class ContentLookupOperation implements Operation, Receiver
|
||||||
{
|
{
|
||||||
@ -49,7 +47,7 @@ public class ContentLookupOperation implements Operation, Receiver
|
|||||||
|
|
||||||
private final ContentLookupMessage lookupMessage;
|
private final ContentLookupMessage lookupMessage;
|
||||||
|
|
||||||
private boolean error, contentsFound;
|
private boolean contentsFound;
|
||||||
private final SortedMap<Node, Byte> nodes;
|
private final SortedMap<Node, Byte> nodes;
|
||||||
|
|
||||||
/* Tracks messages in transit and awaiting reply */
|
/* Tracks messages in transit and awaiting reply */
|
||||||
@ -172,7 +170,6 @@ public class ContentLookupOperation implements Operation, Receiver
|
|||||||
if (unasked.isEmpty() && this.messagesTransiting.isEmpty())
|
if (unasked.isEmpty() && this.messagesTransiting.isEmpty())
|
||||||
{
|
{
|
||||||
/* We have no unasked nodes nor any messages in transit, we're finished! */
|
/* We have no unasked nodes nor any messages in transit, we're finished! */
|
||||||
error = false;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user