public class RoutingTable extends Object
| Constructor and Description |
|---|
RoutingTable(int k,
Key localNodeId,
KademliaClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(Node node) |
List<Node> |
findClosest(Key lookupId,
int numberOfRequiredNodes) |
int |
getBucketId(Key nid)
Compute the bucket ID in which a given node should be placed; the bucketId is computed based on how far the node is away from the Local Node.
|
Bucket[] |
getBuckets() |
java.util.stream.Stream<Bucket> |
getBucketStream() |
void |
retireNode(Node node) |
public RoutingTable(int k,
Key localNodeId,
KademliaClient client)
public final int getBucketId(Key nid)
nid - The Key for which we want to find which bucket it belong topublic void addNode(Node node)
public Bucket[] getBuckets()
public java.util.stream.Stream<Bucket> getBucketStream()
public void retireNode(Node node)
Copyright © 2016. All Rights Reserved.