java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.tunnel.pool.TestJob.PumpJob
All Implemented Interfaces:
Job
Enclosing class:
TestJob

private static class TestJob.PumpJobextends JobImpl
Single queue entry that drains the first-test buffer in small batches. Batched tunnels are dispatched directly from this job (no per-tunnel queue entry), so draining a large UNTESTED backlog costs one ready queue slot and a health-paced trickle instead of one slot per tunnel. The next run is queued while the buffer is non-empty and the flag stays set; the flag clears on an empty buffer, on shutdown, or when this job is dropped under overload (the next offer revives it).
  • Field Details

    • _ctx

      private final RouterContext _ctx
      The router context, for scheduling.
  • Constructor Details

    • PumpJob

      PumpJob(RouterContext ctx)
      Prepares to pump test messages through the tunnels.
      Parameters:
      ctx - the router context
  • Method Details

    • 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.
    • dropped

      public void dropped()
      Description copied from class: JobImpl
      Default implementation does nothing. Called when the job is dropped due to router overload. Subclasses can override to perform cleanup or requeueing of other tasks.
      Specified by:
      dropped in interface Job
      Overrides:
      dropped in class JobImpl
    • scheduleNext

      private void scheduleNext()
      Schedules the next pump pass.