Package net.i2p.kademlia
Class RandomIfOldTrimmer<T extends SimpleDataStructure>
java.lang.Object
net.i2p.kademlia.RandomTrimmer<T>
net.i2p.kademlia.RandomIfOldTrimmer<T>
- All Implemented Interfaces:
 KBucketTrimmer<T>
Removes a random element, but only if the bucket hasn't changed in 5 minutes.
- Since:
 - 0.9.2 in i2psnark, moved to core in 0.9.10
 
- 
Field Summary
Fields inherited from class net.i2p.kademlia.RandomTrimmer
_ctx - 
Constructor Summary
Constructors - 
Method Summary
 
- 
Constructor Details
- 
RandomIfOldTrimmer
 
 - 
 - 
Method Details
- 
trim
Description copied from interface:KBucketTrimmerCalled 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.- Specified by:
 trimin interfaceKBucketTrimmer<T extends SimpleDataStructure>- Overrides:
 trimin classRandomTrimmer<T extends SimpleDataStructure>- Parameters:
 kbucket- the kbucket that is now too big- Returns:
 - true to actually add the entry.
 
 
 -