|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.tunnel.pool.BuildExecutor
class BuildExecutor
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). Note that 10 minute tunnel expiration is hardcoded in here. As of 0.8.11, inbound request handling is done in a separate thread.
Constructor Summary | |
---|---|
BuildExecutor(RouterContext ctx,
TunnelPoolManager mgr)
|
Method Summary | |
---|---|
void |
buildComplete(PooledTunnelCreatorConfig cfg,
TunnelPool pool)
This wakes up the executor, so call this after TunnelPool.addTunnel() so we don't build too many. |
void |
buildSuccessful(PooledTunnelCreatorConfig cfg)
|
(package private) void |
buildTunnel(TunnelPool pool,
PooledTunnelCreatorConfig cfg)
|
boolean |
isRunning()
|
(package private) PooledTunnelCreatorConfig |
removeFromBuilding(long id)
This returns the PTCC up to a minute after it 'expired', thus allowing us to still use a tunnel if it was accepted, and to update peer stats. |
void |
repoll()
|
void |
restart()
|
void |
run()
|
void |
shutdown()
Cannot be restarted. |
boolean |
wasRecentlyBuilding(long replyId)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BuildExecutor(RouterContext ctx, TunnelPoolManager mgr)
Method Detail |
---|
public void restart()
public void shutdown()
public void run()
run
in interface Runnable
public boolean isRunning()
void buildTunnel(TunnelPool pool, PooledTunnelCreatorConfig cfg)
public void buildComplete(PooledTunnelCreatorConfig cfg, TunnelPool pool)
public boolean wasRecentlyBuilding(long replyId)
public void buildSuccessful(PooledTunnelCreatorConfig cfg)
public void repoll()
PooledTunnelCreatorConfig removeFromBuilding(long id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |