- Type Parameters:
K- type of SimpleDataStructure objects in the bucket
- All Known Implementing Classes:
KBTrimmer, RandomIfOldTrimmer, RandomTrimmer, RejectTrimmer, StaleContactTrimmer
public interface KBucketTrimmer<K extends SimpleDataStructure>
Called when a kbucket can no longer be split and is too big.
Method Summary
Method Details
trim
Called from add() just before adding the entry. You may call getEntries() and/or remove() from here. Do NOT call add(). To always discard a newer entry, always return false.- Parameters:
kbucket- the kbucket that is now too bigtoAdd- the entry the bucket is about to accept- Returns:
- true to actually add the entry.