java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.tunnel.pool.BuildHandler.HandleReq
- All Implemented Interfaces:
Job
- Enclosing class:
BuildHandler
Job that forwards one build request after its lookup.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicBooleanGuard so the pending count drops only once.private final HashThe next hop the lookup found.private final BuildRequestRecordThe record of the request being answered.private final BuildHandler.BuildMessageStateThe build message being handled.private final longTime the next-hop lookup began.Constructor Summary
ConstructorsConstructorDescriptionHandleReq(RouterContext ctx, BuildHandler.BuildMessageState state, BuildRequestRecord req, Hash nextPeer, AtomicBoolean decremented) Prepares to forward one build request.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
_state
The build message being handled._req
The record of the request being answered._nextPeer
The next hop the lookup found._decremented
Guard so the pending count drops only once.lookupStartTime
private final long lookupStartTimeTime the next-hop lookup began.
Constructor Details
HandleReq
HandleReq(RouterContext ctx, BuildHandler.BuildMessageState state, BuildRequestRecord req, Hash nextPeer, AtomicBoolean decremented) Prepares to forward one build request.- Parameters:
ctx- the router doing the forwardingstate- the build message to handlereq- the record of the requestnextPeer- the next hop founddecremented- guard so the pending count drops once
Method Details
getName
The name of this job.- Returns:
- the job name used for logging and identification
runJob
public void runJob()Complete the join request once the next hop is found.