public class HandleFloodfillDatabaseLookupMessageJob extends HandleDatabaseLookupMessageJob
Handles incoming DatabaseLookupMessage requests from remote peers, performing database searches and sending appropriate replies. Extends the base lookup handling with floodfill-specific logic including query acceptance criteria and capability-based response behavior.
Determines whether to answer all queries based on floodfill status and capability flags. When not operating as floodfill, includes the local RouterInfo in responses to inform peers of the capability change and reduce misdirected queries.
EXPIRE_DELAY| Constructor and Description |
|---|
HandleFloodfillDatabaseLookupMessageJob(RouterContext ctx,
DatabaseLookupMessage receivedMessage,
RouterIdentity from,
Hash fromHash,
long msgIDBloomXor)Creates a new job to handle a floodfill database lookup message |
| Modifier and Type | Method and Description |
|---|---|
protected void | sendClosest(Hash key,
Set<Hash> routerInfoSet,
Hash toPeer,
TunnelId replyTunnel)We extend this here to send our routerInfo back as well, if we are not floodfill. |
dropped, getName, runJob, sendMessagegetContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toStringpublic HandleFloodfillDatabaseLookupMessageJob(RouterContext ctx, DatabaseLookupMessage receivedMessage, RouterIdentity from, Hash fromHash, long msgIDBloomXor)
ctx - the router contextreceivedMessage - the lookup message receivedfrom - the router identity of the senderfromHash - the hash of the sendermsgIDBloomXor - the message ID bloom XORprotected void sendClosest(Hash key, Set<Hash> routerInfoSet, Hash toPeer, TunnelId replyTunnel)
sendClosest in class HandleDatabaseLookupMessageJobkey - the search keyrouterInfoSet - the set of router hashes to sendtoPeer - the destination peerreplyTunnel - the reply tunnel