java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.peermanager.PeerTestJob.PeerReplyTimeoutJob
- All Implemented Interfaces:
Job
- Enclosing class:
PeerTestJob
Called when the peer's response times out.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RouterInfoThe peer whose test timed out.private final TunnelInfoThe tunnel the reply was expected on.private final PeerTestJob.ReplySelectorThe selector to remove from the job queue.private final TunnelInfoThe tunnel the test was sent on.Constructor Summary
ConstructorsConstructorDescriptionPeerReplyTimeoutJob(RouterContext context, RouterInfo peer, TunnelInfo replyTunnel, TunnelInfo sendTunnel, PeerTestJob.ReplySelector sel) Schedules timeout handling when no reply arrived in time.Method Summary
Methods 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 whose test timed out._replyTunnel
The tunnel the reply was expected on._sendTunnel
The tunnel the test was sent on._selector
The selector to remove from the job queue.
Constructor Details
PeerReplyTimeoutJob
public PeerReplyTimeoutJob(RouterContext context, RouterInfo peer, TunnelInfo replyTunnel, TunnelInfo sendTunnel, PeerTestJob.ReplySelector sel) Schedules timeout handling when no reply arrived in time.- Parameters:
context- the router contextpeer- the peer whose test timed outreplyTunnel- the tunnel the reply was expected onsendTunnel- the tunnel the test was sent onsel- the selector to remove from the job queue
Method Details
getName
Name of this job.- Returns:
- the name this job is listed under in the job queue and the logs, "Timeout Peer Test"
getShouldFailPeer
private boolean getShouldFailPeer()Whether a test timeout should fail the peer.- Returns:
- true, always
runJob
public void runJob()Run the timeout handling job.