T - type of SimpleDataStructure objects stored in the bucketpublic interface KBucket<T extends SimpleDataStructure>| Modifier and Type | Method and Description |
|---|---|
boolean | add(T key)Add the peer to the bucket |
void | clear()Remove all entries from this bucket. |
Set<T> | getEntries()Retrieve all routing table entries stored in the bucket. |
void | getEntries(SelectionCollector<T> collector)Add all entries in this bucket to the provided collector. |
int | getKeyCount()Number of keys already contained in this kbucket. |
long | getLastChanged()The last-changed timestamp |
int | getRangeBegin()Lowest order high bit for difference keys. |
int | getRangeEnd()Highest high bit for the difference keys. |
boolean | remove(T key)Remove the key from the bucket |
void | setLastChanged()Update the last-changed timestamp to now. |
boolean add(T key)
void clear()
Set<T> getEntries()
void getEntries(SelectionCollector<T> collector)
collector - the collector to add entries toint getKeyCount()
long getLastChanged()
int getRangeBegin()
int getRangeEnd()
boolean remove(T key)
void setLastChanged()