KBucketTrimmer<T>RandomIfOldTrimmerpublic class RandomTrimmer<T extends SimpleDataStructure> extends Object implements KBucketTrimmer<T>
| Modifier and Type | Field | Description |
|---|---|---|
protected I2PAppContext |
_ctx |
| Constructor | Description |
|---|---|
RandomTrimmer(I2PAppContext ctx,
int max) |
| Modifier and Type | Method | 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