Package net.i2p.router.tunnel.pool
Class TunnelPeerSelector.Excluder
java.lang.Object
net.i2p.router.tunnel.pool.ExcluderBase
net.i2p.router.tunnel.pool.TunnelPeerSelector.Excluder
- Enclosing class:
TunnelPeerSelector
A Set of Hashes that automatically adds to the
Set in the contains() check.
So we don't need to generate the exclude set up front.
- Since:
- 0.9.58
-
Field Summary
Fields inherited from class net.i2p.router.tunnel.pool.ExcluderBase
s -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class net.i2p.router.tunnel.pool.ExcluderBase
add, addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
spliterator
-
Constructor Details
-
Excluder
public Excluder(boolean isInbound, boolean isExploratory) Automatically adds selectPeersInTooManyTunnels(), unless i2np.allowLocal. -
Excluder
Does not add selectPeersInTooManyTunnels(). Makes a copy of toAdd- Parameters:
toAdd- initial contents, copied
-
-
Method Details
-
contains
Overridden to automatically check our exclusion criteria and add the Hash to the set if the criteria are met.- Specified by:
containsin interfaceCollection<Hash>- Specified by:
containsin interfaceSet<Hash>- Specified by:
containsin classExcluderBase- Parameters:
o- a Hash- Returns:
- true if peer should be excluded
-