|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.tunnel.pool.TunnelPeerSelector
public abstract class TunnelPeerSelector
Coordinate the selection of peers to go into a tunnel for one particular pool. Todo: there's nothing non-static in here
Field Summary | |
---|---|
protected RouterContext |
ctx
|
Constructor Summary | |
---|---|
protected |
TunnelPeerSelector(RouterContext context)
|
Method Summary | |
---|---|
protected boolean |
filterSlow(RouterContext ctx,
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 boolean |
filterUptime(RouterContext ctx,
boolean isInbound,
boolean isExploratory)
do we want to skip peers who haven't been up for long? |
Set<Hash> |
getExclude(boolean isInbound,
boolean isExploratory)
Pick peers that we want to avoid |
protected int |
getLength(TunnelPoolSettings settings)
|
protected void |
orderPeers(List rv,
Hash hash)
|
protected List<Hash> |
selectExplicit(TunnelPoolSettings settings,
int length)
For debugging, also possibly for restricted routes? Needs analysis and testing |
abstract 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final RouterContext ctx
Constructor Detail |
---|
protected TunnelPeerSelector(RouterContext context)
Method Detail |
---|
public abstract List<Hash> selectPeers(TunnelPoolSettings settings)
protected int getLength(TunnelPoolSettings settings)
protected boolean shouldSelectExplicit(TunnelPoolSettings settings)
protected List<Hash> selectExplicit(TunnelPoolSettings settings, int length)
public Set<Hash> getExclude(boolean isInbound, boolean isExploratory)
public static boolean shouldExclude(RouterContext ctx, RouterInfo peer)
protected boolean filterUnreachable(boolean isInbound, boolean isExploratory)
protected boolean filterSlow(RouterContext ctx, boolean isInbound, boolean isExploratory)
protected boolean filterUptime(RouterContext ctx, boolean isInbound, boolean isExploratory)
protected void orderPeers(List rv, Hash hash)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |