Package com.biglybt.core.dht.router.impl
Class DHTRouterNodeImpl
java.lang.Object
com.biglybt.core.dht.router.impl.DHTRouterNodeImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List
<DHTRouterContactImpl> private final boolean
private final int
private long
private DHTRouterNodeImpl
private List
<DHTRouterContactImpl> private DHTRouterNodeImpl
private final DHTRouterImpl
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DHTRouterNodeImpl
(DHTRouterImpl _router, int _depth, boolean _contains_router_node_id, List<DHTRouterContactImpl> _buckets) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addNode
(DHTRouterContactImpl node) protected DHTRouterContact
addReplacement
(DHTRouterContactImpl replacement, int max_rep_per_node) protected void
alive
(DHTRouterContactImpl contact) protected String
contactsToString
(List contacts) protected boolean
protected void
dead
(DHTRouterContactImpl contact, boolean force) protected List
protected int
getDepth()
protected DHTRouterNodeImpl
getLeft()
protected List
<DHTRouterContactImpl> protected DHTRouterNodeImpl
getRight()
protected long
void
protected void
requestNodeAdd
(DHTRouterContactImpl contact, boolean definite_change) protected void
protected void
split
(DHTRouterNodeImpl new_left, DHTRouterNodeImpl new_right) protected DHTRouterContactImpl
updateExistingNode
(byte[] node_id, DHTRouterContactAttachment attachment, boolean known_to_be_alive)
-
Field Details
-
router
-
depth
private final int depth -
contains_router_node_id
private final boolean contains_router_node_id -
buckets
-
replacements
-
left
-
right
-
last_lookup_time
private long last_lookup_time
-
-
Constructor Details
-
DHTRouterNodeImpl
protected DHTRouterNodeImpl(DHTRouterImpl _router, int _depth, boolean _contains_router_node_id, List<DHTRouterContactImpl> _buckets)
-
-
Method Details
-
getDepth
protected int getDepth() -
containsRouterNodeID
protected boolean containsRouterNodeID() -
getLeft
-
getRight
-
split
-
getBuckets
-
getReplacements
-
addNode
-
addReplacement
-
updateExistingNode
protected DHTRouterContactImpl updateExistingNode(byte[] node_id, DHTRouterContactAttachment attachment, boolean known_to_be_alive) -
alive
-
dead
-
requestNodeAdd
-
getTimeSinceLastLookup
protected long getTimeSinceLastLookup() -
setLastLookupTime
protected void setLastLookupTime() -
print
-
contactsToString
-