net.i2p.router.tunnel.pool

## Class ExpireJobManager

- java.lang.Object
- - net.i2p.router.JobImpl
  - - net.i2p.router.tunnel.pool.ExpireJobManager

- All Implemented Interfaces:
    Job

      public class ExpireJobManager
      extends JobImpl

  Manager for batching tunnel expirations to reduce job queue overhead. Instead of creating individual ExpireJobs for each tunnel, this manager runs periodically and processes all tunnels ready to expire in a batch. Each tunnel goes through two phases: 1. First phase: Remove from tunnel pool (LeaseSet refresh) 2. Second phase: Remove from tunnel dispatcher (stop accepting traffic)

- - ### Field Summary

    - ### Fields inherited from class net.i2p.router.JobImpl

      `_id`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExpireJobManager(RouterContext ctx)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getName()` Descriptive name of the task
    `void` | `runJob()` Actually perform the task.
    `void` | `scheduleExpiration(PooledTunnelCreatorConfig cfg)` Schedule a tunnel for expiration.

    - ### Methods inherited from class net.i2p.router.JobImpl

      `dropped, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ExpireJobManager

          public ExpireJobManager(RouterContext ctx)

  - ### Method Detail

    - #### getName

          public String getName()

      Description copied from interface: `Job`
      Descriptive name of the task
      Returns:
        the descriptive name of the task

    - #### runJob

          public void runJob()

      Description copied from interface: `Job`
      Actually perform the task. This call blocks until the Job is complete.

    - #### scheduleExpiration

          public void scheduleExpiration(PooledTunnelCreatorConfig cfg)

      Schedule a tunnel for expiration. Called when a tunnel build succeeds.
      Parameters:
        `cfg` - the tunnel configuration to expire