class BuildExecutor extends Object implements Runnable
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
BuildExecutor.Result
Build result enumeration.
|
| Constructor and Description |
|---|
BuildExecutor(RouterContext ctx,
TunnelPoolManager mgr,
GhostPeerManager ghostManager)
Create a new BuildExecutor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
buildComplete(PooledTunnelCreatorConfig cfg,
BuildExecutor.Result result)
Handle a completed tunnel build.
|
(package private) void |
buildTunnel(PooledTunnelCreatorConfig cfg)
Build a tunnel with the given configuration.
|
boolean |
fullStats() |
boolean |
isRunning()
Check if the executor is currently running.
|
(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()
Signal the executor to repoll for tunnel building opportunities.
|
void |
restart() |
void |
run()
Starts the tunnel building process in a loop and takes care of error handling.
|
void |
shutdown()
Cannot be restarted.
|
boolean |
wasRecentlyBuilding(long replyId)
Check if a tunnel build was recently attempted.
|
public BuildExecutor(RouterContext ctx, TunnelPoolManager mgr, GhostPeerManager ghostManager)
ctx - the router contextmgr - the tunnel pool managerghostManager - the ghost peer manager for tracking unresponsive peers @since 0.9.68+public void buildComplete(PooledTunnelCreatorConfig cfg, BuildExecutor.Result result)
cfg - the tunnel configuration that completedresult - the build result (success, failure, etc.)void buildTunnel(PooledTunnelCreatorConfig cfg)
cfg - the tunnel configuration to buildpublic boolean fullStats()
public boolean isRunning()
PooledTunnelCreatorConfig removeFromBuilding(long id)
public void repoll()
public void restart()
public void run()
public void shutdown()
public boolean wasRecentlyBuilding(long replyId)
replyId - the reply message ID to check