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
-
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, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:
contains
in interfaceCollection<Hash>
- Specified by:
contains
in interfaceSet<Hash>
- Specified by:
contains
in classExcluderBase
- Parameters:
o
- a Hash- Returns:
- true if peer should be excluded
-