java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.networkdb.kademlia.StoreJob.FailedJob
- All Implemented Interfaces:
Job
- Enclosing class:
StoreJob
Job to handle failed store attempts.
Called when a particular peer failed to respond before the timeout was reached, or if the peer could not be contacted at all.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RouterInfoThe peer that failed to respond.private final longWhen the message was sent.private final AtomicBooleanTrack if job has already run to prevent duplicate handling.Constructor Summary
ConstructorsConstructorDescriptionFailedJob(RouterContext enclosingContext, RouterInfo peer, long sendOn) Create a failed job for a peer.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
_peer
The peer that failed to respond._sendOn
private final long _sendOnWhen the message was sent._wasRun
Track if job has already run to prevent duplicate handling.
Constructor Details
FailedJob
Create a failed job for a peer.- Parameters:
enclosingContext- the router contextpeer- the peer the store message was sent tosendOn- when the message was sent
Method Details
runJob
public void runJob()Handle the failed store attempt.getName