T - type of SimpleDataStructure objects in the bucketpublic class RandomIfOldTrimmer<T extends SimpleDataStructure> extends RandomTrimmer<T>
_ctx| Constructor and Description |
|---|
RandomIfOldTrimmer(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. |
public RandomIfOldTrimmer(I2PAppContext ctx, int max)
ctx - the contextmax - maximum bucket sizepublic boolean trim(KBucket<T> kbucket, T toAdd)
KBucketTrimmertrim in interface KBucketTrimmer<T extends SimpleDataStructure>trim in class RandomTrimmer<T extends SimpleDataStructure>kbucket - the kbucket that is now too big