Package net.i2p.router.networkdb
Class HandleDatabaseLookupMessageJob
java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.networkdb.HandleDatabaseLookupMessageJob
- All Implemented Interfaces:
Job
- Direct Known Subclasses:
HandleFloodfillDatabaseLookupMessageJob
Handle a lookup for a key received from a remote peer. Needs to be implemented
to send back replies, etc
Unused directly - see kademlia/ for extension
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
If a routerInfo structure isn't this recent, don't send it out. -
Constructor Summary
ConstructorDescriptionHandleDatabaseLookupMessageJob
(RouterContext ctx, DatabaseLookupMessage receivedMessage, RouterIdentity from, Hash fromHash) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
void
dropped()
the router is extremely overloaded, so this job has been dropped.getName()
Descriptive name of the taskvoid
runJob()
Actually perform the task.protected void
protected void
sendMessage
(I2NPMessage message, Hash toPeer, TunnelId replyTunnel) Methods inherited from class net.i2p.router.JobImpl
getAddedBy, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, madeReady, requeue, toString
-
Field Details
-
EXPIRE_DELAY
public static final long EXPIRE_DELAYIf a routerInfo structure isn't this recent, don't send it out. Equal to KNDF.ROUTER_INFO_EXPIRATION_FLOODFILL.- See Also:
-
-
Constructor Details
-
HandleDatabaseLookupMessageJob
public HandleDatabaseLookupMessageJob(RouterContext ctx, DatabaseLookupMessage receivedMessage, RouterIdentity from, Hash fromHash)
-
-
Method Details
-
answerAllQueries
protected boolean answerAllQueries() -
runJob
public void runJob()Description copied from interface:Job
Actually perform the task. This call blocks until the Job is complete. -
sendClosest
-
sendMessage
-
getName
Description copied from interface:Job
Descriptive name of the task -
dropped
public void dropped()Description copied from interface:Job
the router is extremely overloaded, so this job has been dropped. if for some reason the job *must* do some cleanup / requeueing of other tasks, it should do so here.
-