|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public int getRangeBegin()
public int getRangeEnd()
public void setRange(int lowOrderBitLimit, int highOrderBitLimit)
public int getKeyCount()
public boolean shouldContain(Hash key)
public int add(Hash key)
public boolean remove(Hash key)
public java.util.Set getEntries()
public java.util.Set getEntries(java.util.Set toIgnoreHashes)
public void getEntries(SelectionCollector collector)
public void setEntries(java.util.Set entries)
entries
- set of Hash structurespublic Hash generateRandomKey()
public Hash getLocal()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |