Package net.i2p.kademlia
Class RejectTrimmer<T extends SimpleDataStructure>
java.lang.Object
net.i2p.kademlia.RejectTrimmer<T>
- All Implemented Interfaces:
KBucketTrimmer<T>
public class RejectTrimmer<T extends SimpleDataStructure>
extends Object
implements KBucketTrimmer<T>
Removes nothing and always rejects the add. Flood resistant..
- Since:
- 0.9.2 in i2psnark, moved to core in 0.9.10
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
RejectTrimmer
public RejectTrimmer()
-
-
Method Details
-
trim
Description copied from interface:KBucketTrimmer
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.- Specified by:
trim
in interfaceKBucketTrimmer<T extends SimpleDataStructure>
- Parameters:
kbucket
- the kbucket that is now too big- Returns:
- true to actually add the entry.
-