java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.networkdb.HandleDatabaseLookupMessageJob
net.i2p.router.networkdb.kademlia.HandleFloodfillDatabaseLookupMessageJob
All Implemented Interfaces:
Job

public class HandleFloodfillDatabaseLookupMessageJobextends HandleDatabaseLookupMessageJob
Processes database lookup messages received by floodfill routers.

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.

  • Constructor Details

    • HandleFloodfillDatabaseLookupMessageJob

      public HandleFloodfillDatabaseLookupMessageJob(RouterContext ctx, DatabaseLookupMessage receivedMessage, RouterIdentity from, Hash fromHash, long msgIDBloomXor)
      Creates a new job to handle a floodfill database lookup message.
      Parameters:
      ctx - the router context
      receivedMessage - the lookup message received
      from - the router identity of the sender
      fromHash - the hash of the sender
      msgIDBloomXor - the message ID bloom XOR
  • Method Details

    • sendClosest

      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. This gets the word out to routers that we are no longer floodfill, so they will stop bugging us.
      Overrides:
      sendClosest in class HandleDatabaseLookupMessageJob
      Parameters:
      key - the search key
      routerInfoSet - the set of router hashes to send
      toPeer - the destination peer
      replyTunnel - the reply tunnel