java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.tunnel.pool.TestJob.PumpJob
- All Implemented Interfaces:
Job
- Enclosing class:
TestJob
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 Summary
FieldsConstructor Summary
ConstructorsMethod Summary
Methods inherited from class JobImpl
getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toStringModifier and TypeMethodDescriptionfinal 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
_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
runJob
public void runJob()Description copied from interface:JobActually perform the task. This call blocks until the Job is complete.dropped
scheduleNext
private void scheduleNext()Schedules the next pump pass.