net.i2p.kademlia

## Interface KBucketTrimmer<K extends SimpleDataStructure>

- Type Parameters:
    `K` - type of SimpleDataStructure objects in the bucket
  All Known Implementing Classes:
    KBTrimmer, RandomIfOldTrimmer, RandomTrimmer, RejectTrimmer

      public interface KBucketTrimmer<K extends SimpleDataStructure>

  Called when a kbucket can no longer be split and is too big

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `trim(KBucket<K> kbucket, K toAdd)` Called from add() just before adding the entry.

- - ### Method Detail

    - #### trim

          boolean trim(KBucket<K> kbucket,
                       K toAdd)

      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 big
      Returns:
        true to actually add the entry.