|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
interface KBucket
Group, without inherent ordering, a set of keys a certain distance away from a local key, using XOR as the distance metric
Method Summary | |
---|---|
int |
add(Hash key)
Add the peer to the bucket |
Hash |
generateRandomKey()
Generate a random key that would go inside this bucket |
java.util.Set |
getEntries()
Retrieve all routing table entries stored in the bucket |
void |
getEntries(SelectionCollector collector)
|
java.util.Set |
getEntries(java.util.Set toIgnoreHashes)
Retrieve hashes stored in the bucket, excluding the ones specified |
int |
getKeyCount()
Number of keys already contained in this kbuckey |
Hash |
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(java.util.Set 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 |
Method Detail |
---|
int getRangeBegin()
int getRangeEnd()
void setRange(int lowOrderBitLimit, int highOrderBitLimit)
int getKeyCount()
boolean shouldContain(Hash key)
int add(Hash key)
boolean remove(Hash key)
java.util.Set getEntries()
java.util.Set getEntries(java.util.Set toIgnoreHashes)
void getEntries(SelectionCollector collector)
void setEntries(java.util.Set entries)
entries
- set of Hash structuresHash generateRandomKey()
Hash getLocal()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |