java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.tunnel.pool.TunnelPoolManager.BootstrapPool
- All Implemented Interfaces:
Job
- Enclosing class:
TunnelPoolManager
Builds tunnels for a pool that never came up.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TunnelPoolManagerThe manager owning the pool.private final TunnelPoolThe pool being bootstrapped.private static final longBootstrap attempts are 10 seconds apart.private static final intTunnels that end the bootstrap pass.Constructor Summary
ConstructorsConstructorDescriptionBootstrapPool(RouterContext ctx, TunnelPoolManager mgr, TunnelPool pool) Build bootstrap tunnels for exploratory pools after the startup delay.Method Summary
All MethodsMethods inherited from class JobImpl
dropped, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toStringModifier and TypeMethodDescriptionvoiddropped()Default implementation does nothing.final RouterContextThe router context that this job belongs to.longgetJobId()The unique job ID for this job.longThe timestamp when this job was last made ready for execution.The timing object for this job.voidmadeReady(long now) For JobQueue only, not for external use.protected voidrequeue(long delayMs) Requeue this job to run after the specified delay.toString()
Field Details
_mgr
The manager owning the pool._pool
The pool being bootstrapped.BOOTSTRAP_INTERVAL_MS
private static final long BOOTSTRAP_INTERVAL_MSBootstrap attempts are 10 seconds apart.- See Also:
MIN_BOOTSTRAP_TUNNELS
private static final int MIN_BOOTSTRAP_TUNNELSTunnels that end the bootstrap pass.- See Also:
Constructor Details
BootstrapPool
Build bootstrap tunnels for exploratory pools after the startup delay. For exploratory pools, builds 2-hop tunnels (not zero-hop) to provide usable reply paths. Reschedules until pool has sufficient tunnels.- Parameters:
ctx- the router contextmgr- the pool managerpool- the pool to bootstrap
Method Details
getName
runJob
public void runJob()Build bootstrap tunnels for the pool. Reschedules if the pool still needs more tunnels.