T - type of SimpleDataStructure objects in the bucketpublic class RandomTrimmer<T extends SimpleDataStructure> extends Object implements KBucketTrimmer<T>
| Modifier and Type | Field and Description |
|---|---|
protected I2PAppContext |
_ctx |
| Constructor and Description |
|---|
RandomTrimmer(I2PAppContext ctx,
int max) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
trim(KBucket<T> kbucket,
T toAdd)
Called from add() just before adding the entry.
|
protected final I2PAppContext _ctx
public RandomTrimmer(I2PAppContext ctx, int max)
public boolean trim(KBucket<T> kbucket, T toAdd)
KBucketTrimmertrim in interface KBucketTrimmer<T extends SimpleDataStructure>kbucket - the kbucket that is now too big