Class HandleDatabaseLookupMessageJob

  • All Implemented Interfaces:
    Job
    Direct Known Subclasses:
    HandleFloodfillDatabaseLookupMessageJob

    public class HandleDatabaseLookupMessageJob
    extends JobImpl
    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 Detail

      • EXPIRE_DELAY

        public static final long EXPIRE_DELAY
        If a routerInfo structure isn't this recent, don't send it out. Equal to KNDF.ROUTER_INFO_EXPIRATION_FLOODFILL.
        See Also:
        Constant Field Values
      • DEFAULT_PUBLISH_UNREACHABLE

        public static final boolean DEFAULT_PUBLISH_UNREACHABLE
        See Also:
        Constant Field Values
    • Method Detail

      • 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

        protected void sendClosest​(Hash key,
                                   Set<Hash> routerHashes,
                                   Hash toPeer,
                                   TunnelId replyTunnel)
      • getName

        public String 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.
        Specified by:
        dropped in interface Job
        Overrides:
        dropped in class JobImpl