net.i2p.router.networkdb.kademlia

## Class FloodfillStoreJob

- java.lang.Object
- - net.i2p.router.JobImpl
  - - net.i2p.router.networkdb.kademlia.StoreJob
    - - net.i2p.router.networkdb.kademlia.FloodfillStoreJob

- All Implemented Interfaces:
    Job

      class FloodfillStoreJob
      extends StoreJob

  This class extends StoreJob to fire off a FloodfillVerifyStoreJob after a successful store. Stores through this class always request a reply.

- - ### Field Summary

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

      `_log, _state, MIN_STORE_ENCLS2_VERSION, MIN_STORE_LS2_VERSION, MIN_STORE_VERSION`

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

      `_id`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FloodfillStoreJob(RouterContext context, FloodfillNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs)` Create a new FloodfillStoreJob to send data to floodfills.
    `FloodfillStoreJob(RouterContext context, FloodfillNetworkDatabaseFacade facade, Hash key, DatabaseEntry data, Job onSuccess, Job onFailure, long timeoutMs, Set<Hash> toSkip)` Create a new FloodfillStoreJob to send data to floodfills.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getName()` Get the name of this job for logging and debugging.
    `protected int` | `getParallelization()` Get the maximum number of parallel store operations.
    `protected int` | `getRedundancy()` Get the required redundancy level for successful store.
    `protected void` | `succeed()` Handle successful completion of the store operation.

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

      `fail, runJob, shouldStoreEncLS2To, shouldStoreLS2To, shouldStoreTo`

    - ### 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`

- - ### Constructor Detail

    - #### FloodfillStoreJob

          public FloodfillStoreJob(RouterContext context,
                                   FloodfillNetworkDatabaseFacade facade,
                                   Hash key,
                                   DatabaseEntry data,
                                   Job onSuccess,
                                   Job onFailure,
                                   long timeoutMs)

      Create a new FloodfillStoreJob to send data to floodfills.

    - #### FloodfillStoreJob

          public FloodfillStoreJob(RouterContext context,
                                   FloodfillNetworkDatabaseFacade facade,
                                   Hash key,
                                   DatabaseEntry data,
                                   Job onSuccess,
                                   Job onFailure,
                                   long timeoutMs,
                                   Set<Hash> toSkip)

      Create a new FloodfillStoreJob to send data to floodfills.
      Parameters:
        `toSkip` - set of peer hashes to skip (e.g., already have the data), may be null

  - ### Method Detail

    - #### getName

          public String getName()

      Description copied from class: `StoreJob`
      Get the name of this job for logging and debugging.
      Specified by:
        `getName` in interface `Job`
      Overrides:
        `getName` in class `StoreJob`
      Returns:
        job name

    - #### getParallelization

          protected int getParallelization()

      Description copied from class: `StoreJob`
      Get the maximum number of parallel store operations. Note: Overridden in Floodfill Search Job.
      Overrides:
        `getParallelization` in class `StoreJob`
      Returns:
        number of messages to send simultaneously

    - #### getRedundancy

          protected int getRedundancy()

      Description copied from class: `StoreJob`
      Get the required redundancy level for successful store. Note: Overridden in Floodfill Search Job.
      Overrides:
        `getRedundancy` in class `StoreJob`
      Returns:
        number of peers that must receive the data

    - #### succeed

          protected void succeed()

      Description copied from class: `StoreJob`
      Handle successful completion of the store operation. Called when the required redundancy level is reached.
      Overrides:
        `succeed` in class `StoreJob`