ClientPeerSelector
, ExploratoryPeerSelector
public abstract class TunnelPeerSelector
extends java.lang.Object
修飾子とタイプ | フィールド | 説明 |
---|---|---|
protected RouterContext |
ctx |
修飾子 | コンストラクタ | 説明 |
---|---|---|
protected |
TunnelPeerSelector(RouterContext context) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
protected boolean |
filterSlow(boolean isInbound,
boolean isExploratory) |
do we want to skip peers that are slow?
|
protected boolean |
filterUnreachable(boolean isInbound,
boolean isExploratory) |
do we want to skip peers who haven't been up for long?
|
protected java.util.Set<Hash> |
getClosestHopExclude(boolean isInbound) |
Pick peers that we want to avoid for the first OB hop or last IB hop.
|
java.util.Set<Hash> |
getExclude(boolean isInbound,
boolean isExploratory) |
Pick peers that we want to avoid
|
protected int |
getLength(TunnelPoolSettings settings) |
|
protected void |
orderPeers(java.util.List<Hash> rv,
Hash hash) |
see HashComparator
|
protected java.util.List<Hash> |
selectExplicit(TunnelPoolSettings settings,
int length) |
For debugging, also possibly for restricted routes?
Needs analysis and testing
|
abstract java.util.List<Hash> |
selectPeers(TunnelPoolSettings settings) |
Which peers should go into the next tunnel for the given settings?
|
static boolean |
shouldExclude(RouterContext ctx,
RouterInfo peer) |
warning, this is also called by ProfileOrganizer.isSelectable()
|
protected boolean |
shouldSelectExplicit(TunnelPoolSettings settings) |
For debugging, also possibly for restricted routes?
Needs analysis and testing
|
protected final RouterContext ctx
protected TunnelPeerSelector(RouterContext context)
public abstract java.util.List<Hash> selectPeers(TunnelPoolSettings settings)
protected int getLength(TunnelPoolSettings settings)
protected boolean shouldSelectExplicit(TunnelPoolSettings settings)
protected java.util.List<Hash> selectExplicit(TunnelPoolSettings settings, int length)
public java.util.Set<Hash> getExclude(boolean isInbound, boolean isExploratory)
protected java.util.Set<Hash> getClosestHopExclude(boolean isInbound)
isInbound
- unusedpublic static boolean shouldExclude(RouterContext ctx, RouterInfo peer)
protected boolean filterUnreachable(boolean isInbound, boolean isExploratory)
protected boolean filterSlow(boolean isInbound, boolean isExploratory)