java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.networkdb.kademlia.SearchUpdateReplyFoundJob
Called after a match to a db search is found
Used only by SearchJob which is only ExploreJobploreJob.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final KademliaNetworkDatabaseFacadeThe network database facade.private final booleanTrue if the peer is a floodfill.private final SearchJobThe search job being updated.private final LogThe log for the search update.private I2NPMessageThe reply message that was found.private final TunnelInfoThe tunnel the request was sent through.private final HashThe hash of the searched peer.private final TunnelInfoThe tunnel the reply came back through.private final longWhen the request was sent.private final SearchStateThe state of the search.Constructor Summary
ConstructorsConstructorDescriptionSearchUpdateReplyFoundJob(RouterContext context, RouterInfo peer, SearchState state, KademliaNetworkDatabaseFacade facade, SearchJob job) Create job with no tunnel info.SearchUpdateReplyFoundJob(RouterContext context, RouterInfo peer, SearchState state, KademliaNetworkDatabaseFacade facade, SearchJob job, TunnelInfo outTunnel, TunnelInfo replyTunnel) Create job with tunnel info for reply routing.Method Summary
All MethodsModifier and TypeMethodDescriptiongetName()Name of this job.voidrunJob()Process the store message and continue the search.voidsetMessage(I2NPMessage message) Store the matched message, then continue the search.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
_log
The log for the search update._message
The reply message that was found._peer
The hash of the searched peer._state
The state of the search._facade
The network database facade._job
The search job being updated._outTunnel
The tunnel the request was sent through._replyTunnel
The tunnel the reply came back through._isFloodfillPeer
private final boolean _isFloodfillPeerTrue if the peer is a floodfill._sentOn
private final long _sentOnWhen the request was sent.
Constructor Details
SearchUpdateReplyFoundJob
public SearchUpdateReplyFoundJob(RouterContext context, RouterInfo peer, SearchState state, KademliaNetworkDatabaseFacade facade, SearchJob job) Create job with no tunnel info.- Parameters:
context- the router context supplying the log and the network database facadepeer- the peer that returned the matching database replystate- the search this job continuesfacade- the network database facade to store the found entry injob- the search job to tell when the reply has been handled
SearchUpdateReplyFoundJob
public SearchUpdateReplyFoundJob(RouterContext context, RouterInfo peer, SearchState state, KademliaNetworkDatabaseFacade facade, SearchJob job, TunnelInfo outTunnel, TunnelInfo replyTunnel) Create job with tunnel info for reply routing.- Parameters:
context- the router context supplying the log and the network database facadepeer- the peer that returned the matching database replystate- the search this job continuesfacade- the network database facade to store the found entry injob- the search job to tell when the reply has been handledoutTunnel- the tunnel the original search request went out on, used to reply over the same pathreplyTunnel- the tunnel to send the reply back over, or null to let the job build one from the peer's RouterInfo
Method Details
getName
runJob
setMessage
Store the matched message, then continue the search.- Specified by:
setMessagein interfaceReplyJob- Parameters:
message- the received I2NP message