net.i2p.router.networkdb.kademlia

## Class FloodOnlySearchJob

- java.lang.Object
- - net.i2p.router.JobImpl
  - - net.i2p.router.networkdb.kademlia.FloodSearchJob
    - - net.i2p.router.networkdb.kademlia.FloodOnlySearchJob

- All Implemented Interfaces:
    Job
  Direct Known Subclasses:
    DirectLookupJob, SingleSearchJob

      abstract class FloodOnlySearchJob
      extends FloodSearchJob

  Flood-only search implementation for network database lookups.

  Sends search queries to floodfill peers with no fallback to Kademlia search. Fails completely if no successful match is received from initial peers. Includes enhancements to help routers bootstrap back into the network after losing floodfill references by following floodfill keys in DatabaseSearchReplyMessages.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ReplyJob` | `_onReply`
    `protected Job` | `_onTimeout`
    `protected MessageSelector` | `_replySelector`

    - ### Fields inherited from class net.i2p.router.networkdb.kademlia.FloodSearchJob

      `_created, _dead, _expiration, _facade, _isLease, _key, _log, _lookupsRemaining, _onFailed, _onFind, _success, _timeoutMs, CONCURRENT_SEARCHES`

    - ### Fields inherited from class net.i2p.router.JobImpl

      `_id`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `FloodOnlySearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs)` For DirectLookupJob extension, RI only, different match job
    `` | `FloodOnlySearchJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade, Hash key, Job onFind, Job onFailed, int timeoutMs, boolean isLease)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) int` | `decrementRemaining(Hash peer)` Note that we heard from the peer
    `(package private) void` | `failed()` Deprecated, unused, see FOSJ override
    `String` | `getName()` Deprecated, unused, see FOSJ override
    `void` | `runJob()` Deprecated, unused, see FOSJ override
    `boolean` | `shouldProcessDSRM()`
    `(package private) void` | `success()` Deprecated, unused, see FOSJ override

    - ### Methods inherited from class net.i2p.router.networkdb.kademlia.FloodSearchJob

      `addDeferred, decrementRemaining, getCreated, getExpiration, getKey, getLookupsRemaining`

    - ### Methods inherited from class net.i2p.router.JobImpl

      `dropped, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### _onReply

          protected final ReplyJob _onReply

    - #### _onTimeout

          protected final Job _onTimeout

    - #### _replySelector

          protected final MessageSelector _replySelector

  - ### Constructor Detail

    - #### FloodOnlySearchJob

          protected FloodOnlySearchJob(RouterContext ctx,
                                       FloodfillNetworkDatabaseFacade facade,
                                       Hash key,
                                       Job onFind,
                                       Job onFailed,
                                       int timeoutMs)

      For DirectLookupJob extension, RI only, different match job

    - #### FloodOnlySearchJob

          public FloodOnlySearchJob(RouterContext ctx,
                                    FloodfillNetworkDatabaseFacade facade,
                                    Hash key,
                                    Job onFind,
                                    Job onFailed,
                                    int timeoutMs,
                                    boolean isLease)

  - ### Method Detail

    - #### decrementRemaining

          int decrementRemaining(Hash peer)

      Note that we heard from the peer
      Returns:
        number remaining after decrementing

    - #### failed

          void failed()

      Description copied from class: `FloodSearchJob`
      Deprecated, unused, see FOSJ override
      Overrides:
        `failed` in class `FloodSearchJob`

    - #### getName

          public String getName()

      Description copied from class: `FloodSearchJob`
      Deprecated, unused, see FOSJ override
      Specified by:
        `getName` in interface `Job`
      Overrides:
        `getName` in class `FloodSearchJob`
      Returns:
        the descriptive name of the task

    - #### runJob

          public void runJob()

      Description copied from class: `FloodSearchJob`
      Deprecated, unused, see FOSJ override
      Specified by:
        `runJob` in interface `Job`
      Overrides:
        `runJob` in class `FloodSearchJob`

    - #### shouldProcessDSRM

          public boolean shouldProcessDSRM()

    - #### success

          void success()

      Description copied from class: `FloodSearchJob`
      Deprecated, unused, see FOSJ override
      Overrides:
        `success` in class `FloodSearchJob`