net.i2p.router.tunnel.pool
Class BuildExecutor
java.lang.Object
net.i2p.router.tunnel.pool.BuildExecutor
- All Implemented Interfaces:
- java.lang.Runnable
class BuildExecutor
- extends java.lang.Object
- implements java.lang.Runnable
Single threaded controller of the tunnel creation process, spanning all tunnel pools.
Essentially, this loops across the pools, sees which want to build tunnels, and fires
off the necessary activities if the load allows. If nothing wants to build any tunnels,
it waits for a short period before looping again (or until it is told that something
changed, such as a tunnel failed, new client started up, or tunnel creation was aborted).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BuildExecutor
public BuildExecutor(RouterContext ctx,
TunnelPoolManager mgr)
run
public void run()
- Don't even try to build tunnels if we're saturated
- Specified by:
run
in interface java.lang.Runnable
isRunning
public boolean isRunning()
buildTunnel
void buildTunnel(TunnelPool pool,
PooledTunnelCreatorConfig cfg)
buildComplete
public void buildComplete(PooledTunnelCreatorConfig cfg,
TunnelPool pool)
wasRecentlyBuilding
public boolean wasRecentlyBuilding(long replyId)
buildSuccessful
public void buildSuccessful(PooledTunnelCreatorConfig cfg)
repoll
public void repoll()
locked_getCurrentlyBuilding
java.util.List locked_getCurrentlyBuilding()
getInboundBuildQueueSize
public int getInboundBuildQueueSize()