|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.tunnel.pool.TunnelPool
public class TunnelPool
A group of tunnels for the router or a particular client, in a single direction.
Constructor Summary | |
---|---|
TunnelPool(RouterContext ctx,
TunnelPoolManager mgr,
TunnelPoolSettings settings,
TunnelPeerSelector sel)
|
Method Summary | |
---|---|
(package private) void |
addTunnel(TunnelInfo info)
Add to the pool. |
(package private) void |
buildComplete(PooledTunnelCreatorConfig cfg)
Remove from the _inprogress list |
(package private) boolean |
buildFallback()
|
(package private) PooledTunnelCreatorConfig |
configureNewTunnel()
|
int |
countHowManyToBuild()
Gather the data to see how many tunnels to build, and then actually compute that value (delegated to the countHowManyToBuild function below) |
long |
getLifetimeProcessed()
|
(package private) TunnelPoolManager |
getManager()
|
TunnelPeerSelector |
getSelector()
|
TunnelPoolSettings |
getSettings()
|
TunnelInfo |
getTunnel(TunnelId gatewayId)
|
(package private) int |
getTunnelCount()
duplicate of size(), let's pick one |
boolean |
isAlive()
|
List |
listPending()
list of tunnelInfo instances of tunnels currently being built |
List<TunnelInfo> |
listTunnels()
Return a list of tunnels in the pool |
boolean |
needFallback()
Do we really need more fallbacks? Used to prevent a zillion of them |
(package private) void |
refreshLeaseSet()
noop for outbound |
(package private) void |
refreshSettings()
|
(package private) void |
removeTunnel(TunnelInfo info)
Remove from the pool. |
TunnelInfo |
selectTunnel()
Pull a random tunnel out of the pool. |
void |
setSettings(TunnelPoolSettings settings)
|
void |
shutdown()
|
int |
size()
duplicate of getTunnelCount(), let's pick one |
void |
startup()
|
String |
toString()
|
void |
tunnelFailed(PooledTunnelCreatorConfig cfg)
This may be called multiple times from TestJob |
(package private) void |
updateRate()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TunnelPool(RouterContext ctx, TunnelPoolManager mgr, TunnelPoolSettings settings, TunnelPeerSelector sel)
Method Detail |
---|
public void startup()
public void shutdown()
TunnelPoolManager getManager()
void refreshSettings()
public TunnelInfo selectTunnel()
public TunnelInfo getTunnel(TunnelId gatewayId)
public List<TunnelInfo> listTunnels()
public boolean needFallback()
public List listPending()
int getTunnelCount()
public TunnelPoolSettings getSettings()
public void setSettings(TunnelPoolSettings settings)
public TunnelPeerSelector getSelector()
public boolean isAlive()
public int size()
void addTunnel(TunnelInfo info)
void removeTunnel(TunnelInfo info)
public void tunnelFailed(PooledTunnelCreatorConfig cfg)
void updateRate()
void refreshLeaseSet()
boolean buildFallback()
public long getLifetimeProcessed()
public int countHowManyToBuild()
PooledTunnelCreatorConfig configureNewTunnel()
void buildComplete(PooledTunnelCreatorConfig cfg)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |