Packages that use TunnelPool
Package
Description
The I2P router application handles I2P network communication.
Simplified fake implementations of router interfaces (comm system and friends) for testing and embedded builds.
Tunnel pool management: pool lifecycle, peer selection, build scheduling and failure handling for client and exploratory tunnels.
Helpers and handlers for the router console user interface, packaged in routerconsole.war and accessible only from JSP files.
Uses of TunnelPool in net.i2p.router
Methods in net.i2p.router that return TunnelPoolModifier and TypeMethodDescriptionTunnelManagerFacade.getInboundExploratoryPool()For TunnelRenderer in router console.TunnelManagerFacade.getInboundPool(Hash client) Inbound tunnel pool for the given client, or null if none.TunnelManagerFacade.getOutboundExploratoryPool()For TunnelRenderer in router console.TunnelManagerFacade.getOutboundPool(Hash client) Outbound tunnel pool for the given client, or null if none.Methods in net.i2p.router that return types with arguments of type TunnelPoolModifier and TypeMethodDescriptionTunnelManagerFacade.getInboundClientPools()For TunnelRenderer in router console.TunnelManagerFacade.getOutboundClientPools()For TunnelRenderer in router console.Method parameters in net.i2p.router with type arguments of type TunnelPoolModifier and TypeMethodDescriptionvoidTunnelManagerFacade.listPools(List<TunnelPool> out) For TunnelRenderer in router console.Uses of TunnelPool in net.i2p.router.dummy
Methods in net.i2p.router.dummy that return TunnelPoolModifier and TypeMethodDescriptionDummyTunnelManagerFacade.getInboundExploratoryPool()DummyTunnelManagerFacade.getInboundPool(Hash client) DummyTunnelManagerFacade.getOutboundExploratoryPool()DummyTunnelManagerFacade.getOutboundPool(Hash client) Methods in net.i2p.router.dummy that return types with arguments of type TunnelPoolModifier and TypeMethodDescriptionDummyTunnelManagerFacade.getInboundClientPools()DummyTunnelManagerFacade.getOutboundClientPools()Method parameters in net.i2p.router.dummy with type arguments of type TunnelPoolUses of TunnelPool in net.i2p.router.tunnel.pool
Subclasses of TunnelPool in net.i2p.router.tunnel.poolModifier and TypeClassDescriptionclassA tunnel pool with its own settings and Destination, but uses another pool for its tunnels.Fields in net.i2p.router.tunnel.pool declared as TunnelPoolModifier and TypeFieldDescriptionprivate final TunnelPoolAliasedTunnelPool._aliasOfThe pool this one is a handle on.private final TunnelPoolTunnelPoolManager._inboundExploratoryThe router's inbound exploratory pool.private final TunnelPoolTunnelPoolManager._outboundExploratoryThe router's outbound exploratory pool.private TunnelPoolTunnelPool._pairedPoolThe opposite-direction pool for the same destination.private final TunnelPoolPooledTunnelCreatorConfig._poolThe pool this config belongs to.private final TunnelPoolTestJob._poolThe pool whose tunnels are tested.private final TunnelPoolTunnelPoolManager.BootstrapPool._poolThe pool being bootstrapped.private final TunnelPoolTunnelPoolManager.ConditionalOutboundStartup.inboundThe inbound pool paired with it.private final TunnelPoolTunnelPoolManager.ConditionalOutboundStartup.outboundThe outbound pool being waited on.(package private) final TunnelPoolTestJob.PendingTest.poolThe pool that owns the tunnel, captured at offer time.Fields in net.i2p.router.tunnel.pool with type parameters of type TunnelPoolModifier and TypeFieldDescriptionprivate final Map<Hash, TunnelPool> TunnelPoolManager._clientInboundPoolsHash (destination) to TunnelPool.private final Map<Hash, TunnelPool> TunnelPoolManager._clientOutboundPoolsHash (destination) to TunnelPool.private final ConcurrentHashMap<TunnelPool, Long> BuildExecutor._lastConfigureTimeThrottle for peer-selection hot path: BldExecutor was pegging at 98% inClientPeerSelector.selectSingleHop → IBGWExcluder.contains even after endpoint caching, because the tight loop called pool.configureNewTunnel() for every wanted pool without per-pool spacing.private final ConcurrentHashMap<TunnelPool, Long> BuildExecutor._lastRebuildTimeWhen each pool last rebuilt its tunnels.private final ConcurrentHashMap<TunnelPool, long[]> BuildExecutor._poolFailureStatePer-pool failure tracking state.Methods in net.i2p.router.tunnel.pool that return TunnelPoolModifier and TypeMethodDescriptionTunnelPoolManager.getInboundExploratoryPool()For TunnelRenderer in router console.TunnelPoolManager.getInboundPool(Hash client) The client's inbound pool, creating it if needed.TunnelPoolManager.getOutboundExploratoryPool()For TunnelRenderer in router console.TunnelPoolManager.getOutboundPool(Hash client) The client's outbound pool, creating it if needed.(package private) TunnelPoolTunnelPool.getPairedPool()Paired pool (inbound <-> outbound for same destination).PooledTunnelCreatorConfig.getTunnelPool()Get the pool this tunnel belongs to.Methods in net.i2p.router.tunnel.pool that return types with arguments of type TunnelPoolModifier and TypeMethodDescriptionTunnelPoolManager.getInboundClientPools()For TunnelRenderer in router console.TunnelPoolManager.getOutboundClientPools()For TunnelRenderer in router console.Methods in net.i2p.router.tunnel.pool with parameters of type TunnelPoolModifier and TypeMethodDescription(package private) static StringTestJob.batchDenialReason(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool) Live gate evaluation for one buffered candidate: reads the in-flight gauges and configured budgets from the context's runtime state, then defers to the pure overload.(package private) static TestJob.InstanceClaimsTestJob.claimBatchSlot(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool) Reserve the instance slots a batched TestJob needs: the total counter (memory bound) and the per-pool claim.private static TunnelBuildMessageBuildRequestor.createTunnelBuildMessage(RouterContext ctx, TunnelPool pool, PooledTunnelCreatorConfig cfg, TunnelInfo pairedTunnel, BuildExecutor exec) Creates a tunnel build message using the most efficient format supported by all hops and the local router.private voidTestJob.deferForMissingPartner(TunnelPool paired, String direction) Handle a test round whose paired pool had no tunnel to pair with.private voidTunnelPoolManager.failTunnelsWithFirstHop(TunnelPool pool, Hash peer) Fail all (outbound) tunnels with this peer as first hop (not counting us).private voidTunnelPoolManager.failTunnelsWithLastHop(TunnelPool pool, Hash peer) Fail all (inbound) tunnels with this peer as last hop (not counting us).private PooledTunnelCreatorConfigTunnelPool.findPairedInPool(TunnelPool pool, TunnelId pairedGW) Look up the paired tunnel in the given pool.private static intTestJob.getClientPoolTestBudget(RouterContext ctx, TunnelPool pool, int activeCount) Per-pool test budget for client pools, bounded by three knobs: the Tuner budget (dynamic), the pool-coverage cap (at most coverageThreshold of a pool's active tunnels under test at once), and the absolute per-pool cap.private long[]BuildExecutor.getOrCreatePoolState(TunnelPool pool) Failure tracking state for a pool, created if absent.TunnelPeerSelector.getPeersInPool(RouterContext ctx, TunnelPool pool) All non-self peers in active tunnels of the given pool.(package private) static StringTestJob.getPoolId(TunnelPool pool) Generate a stable, collision-free identifier for a tunnel pool, used as the key for the per-pool instance and in-flight gauges.(package private) static booleanTestJob.hasPoolTestHeadroom(TestJob.BatchState state, RouterContext ctx, TunnelPool pool, int activeCount) Whether the per-pool instance budget still has room for one more test inpool.protected static booleanTunnelPeerSelector.hasTunnelLongerThanOne(TunnelPool pool) True if the pool has at least one active tunnel longer than one hop.(package private) booleanBuildExecutor.isPoolInBackoff(TunnelPool pool) Check if a pool is in backoff due to consecutive build failures.(package private) static booleanTestJob.isPoolMember(TunnelPool pool, PooledTunnelCreatorConfig cfg) Whether a pool still owns a tunnel config, i.e.(package private) static booleanTestJob.isZeroActivePool(TunnelPool pool) Whether a client pool has zero active tunnels, i.e.(package private) static booleanBuildExecutor.isZeroHopEmergency(TunnelPool pool) Whether this pass should treat the pool as a zero-hop emergency: a multi-hop-configured, non-ping pool currently serving traffic through a length-1 bootstrap fallback.(package private) static booleanTestJob.offerFirstTest(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool) Offer a tunnel's first test to the batched dispatch buffer instead of creating a queue entry per tunnel.(package private) static intTestJob.poolInFlightBudget(RouterContext ctx, TunnelPool pool) Per-pool in-flight budget for a pool in its current state, or -1 when the pool gate is skipped.(package private) voidBuildExecutor.removePoolState(TunnelPool pool) Remove failure state for a pool that is being removed.private static intBuildExecutor.score(TunnelPool p) Priority score for build urgency.private static TunnelInfoBuildRequestor.selectPairedTunnel(RouterContext ctx, TunnelPool pool, PooledTunnelCreatorConfig cfg, BuildExecutor exec, Log log) Selects an appropriate tunnel for sending the build reply.(package private) voidTunnelPool.setPairedPool(TunnelPool pool) Paired pool (inbound <-> outbound for same destination).(package private) static booleanTestJob.shouldDropPending(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool) Whether a buffered candidate should be discarded instead of tested: its pool died, it was never fully built, it is a ping tunnel or was pruned for early expiry, its test already started (registered while buffered), or it is no longer UNTESTED (a prior dispatch tested or traffic-proven it while it waited).(package private) static booleanTestJob.shouldRejectAtOffer(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool) Whether an offer must be refused outright: no pool owns the tunnel, it was never fully built, it is a ping tunnel, it is already expired (only the drain-time early-expiry window is left toTestJob.shouldDropPending(RouterContext, PooledTunnelCreatorConfig, TunnelPool), since last-chance offers arrive inside it on purpose), its test already started, or it is no longer UNTESTED.Method parameters in net.i2p.router.tunnel.pool with type arguments of type TunnelPoolModifier and TypeMethodDescriptionprivate intBuildExecutor.buildZeroHopTunnels(List<TunnelPool> wanted, int allowed) Iterate over the 0hop tunnels, running them all inline regardless of how many are allowed.private voidBuildExecutor.calculatePairedBuilds(List<TunnelPool> pools, List<TunnelPool> wanted) Graduated-urgency replenishment - replaces simple deficit-based approach.BuildExecutor.collectPairTargets(List<TunnelPool> pools) Collect per-direction build quantity targets for paired destinations, used by the proportional per-direction cap in calculatePairedBuilds().private static intBuildExecutor.countExpiryUrgent(List<TunnelPool> pools) Counts wanting pools whose charge is expiry urgency rather than deficit.voidTunnelPoolManager.listPools(List<TunnelPool> out) List of TunnelPool instances currently in play.(package private) intBuildExecutor.refreshUrgentCeiling(List<TunnelPool> wanted) Recomputes the concurrency ceiling for the dispatch pass about to run, from the pools it wants to build, and records it on this instance.private static voidTunnelPoolManager.setSettings(Map<Hash, TunnelPool> pools, Hash client, TunnelPoolSettings settings) Applies settings to one client's pools.Constructors in net.i2p.router.tunnel.pool with parameters of type TunnelPoolModifierConstructorDescription(package private)AliasedTunnelPool(RouterContext ctx, TunnelPoolManager mgr, TunnelPoolSettings settings, TunnelPool aliasOf) Create an aliased tunnel pool.BootstrapPool(RouterContext ctx, TunnelPoolManager mgr, TunnelPool pool) Build bootstrap tunnels for exploratory pools after the startup delay.ConditionalOutboundStartup(TunnelPool out, TunnelPool in, TunnelPoolManager mgr, RouterContext context, Hash dest) Schedule a startup that is abandoned unless the pools are ready in time.(package private)PendingTest(PooledTunnelCreatorConfig cfg, TunnelPool pool) Capture the config's key and pool identity now, so the buffer can be de-duplicated and re-verified at drain time even if the config changes.PooledTunnelCreatorConfig(RouterContext ctx, int length, boolean isInbound, Hash destination, TunnelPool pool) Creates a new instance of PooledTunnelCreatorConfig.TestJob(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool) TestJob.(package private)TestJob(RouterContext ctx, PooledTunnelCreatorConfig cfg, TunnelPool pool, TestJob.InstanceClaims claims) TestJob for a caller that already holds the instance slots, such as the batch pump, which must claim before it constructs so a refused candidate can go back to the buffer instead of being dropped.Uses of TunnelPool in net.i2p.router.web.helpers
Classes in net.i2p.router.web.helpers that implement interfaces with type arguments of type TunnelPoolModifier and TypeClassDescriptionprivate classSort tunnels by the name of the tunnel.Methods in net.i2p.router.web.helpers with parameters of type TunnelPoolModifier and TypeMethodDescriptionintTunnelRenderer.TPComparator.compare(TunnelPool l, TunnelPool r) Order pools by locale-collated display name, falling back to the destination base32 and then to the next expiration.private longTunnelRenderer.getNextExpiry(TunnelPool pool) Get next tunnel expiry from pool (excludes failed tunnels).private StringTunnelRenderer.getPoolTip(TunnelPool in) Get the pool's torrent names for the tooltip, when the tunnel is a shared I2PSnark pool destination and the i2psnark.poolMembers session property is set.private StringTunnelRenderer.getTunnelName(TunnelPool in) Get display name for the tunnel.voidTunnelRenderer.renderLifetimeBandwidth(Writer out, TunnelPool in, TunnelPool outPool) Render the lifetime bandwidth table: bytes sent and received by each tunnel of the two pools combined, longest-lived tunnel first.private voidTunnelRenderer.renderPool(Writer out, TunnelPool in, TunnelPool outPool) Renders one tunnel pool's table.private voidTunnelRenderer.renderPoolSummary(Writer out, TunnelPool in, TunnelPool outPool, Hash client) Render a summary table for a tunnel pool.