net.i2p.router.networkdb.kademlia
interface KBucket
Modifier and Type | Method and Description |
---|---|
int |
add(Hash key)
Add the peer to the bucket
|
Hash |
generateRandomKey()
Generate a random key that would go inside this bucket
|
Set<Hash> |
getEntries()
Retrieve all routing table entries stored in the bucket
|
void |
getEntries(SelectionCollector collector) |
Set<Hash> |
getEntries(Set<Hash> toIgnoreHashes)
Retrieve hashes stored in the bucket, excluding the ones specified
|
int |
getKeyCount()
Number of keys already contained in this kbuckey
|
LocalHash |
getLocal() |
int |
getRangeBegin()
lowest order high bit for difference keys
|
int |
getRangeEnd()
highest high bit for the difference keys
|
boolean |
remove(Hash key)
Remove the key from the bucket
|
void |
setEntries(Set<Hash> entries)
Fill the bucket with entries
|
void |
setRange(int lowOrderBitLimit,
int highOrderBitLimit)
Set the range low and high bits for difference keys
|
boolean |
shouldContain(Hash key)
whether or not the key qualifies as part of this bucket
|
int getRangeBegin()
int getRangeEnd()
void setRange(int lowOrderBitLimit, int highOrderBitLimit)
int getKeyCount()
boolean shouldContain(Hash key)
int add(Hash key)
boolean remove(Hash key)
Set<Hash> getEntries()
Set<Hash> getEntries(Set<Hash> toIgnoreHashes)
void getEntries(SelectionCollector collector)
void setEntries(Set<Hash> entries)
entries
- set of Hash structuresHash generateRandomKey()
LocalHash getLocal()