net.i2p.router.networkdb.kademlia

## Interface DataStore

- All Known Implementing Classes:
    PersistentDataStore, TransientDataStore

      public interface DataStore

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `countLeaseSets()`
    `DatabaseEntry` | `get(Hash key)`
    `DatabaseEntry` | `get(Hash key, boolean persist)`
    `Collection<DatabaseEntry>` | `getEntries()`
    `Set<Hash>` | `getKeys()`
    `Set<Map.Entry<Hash,DatabaseEntry>>` | `getMapEntries()`
    `boolean` | `isInitialized()`
    `boolean` | `isKnown(Hash key)`
    `boolean` | `put(Hash key, DatabaseEntry data)`
    `boolean` | `put(Hash key, DatabaseEntry data, boolean persist)`
    `DatabaseEntry` | `remove(Hash key)`
    `DatabaseEntry` | `remove(Hash key, boolean persist)`
    `void` | `rescan()`
    `void` | `restart()`
    `void` | `stop()`

- - ### Method Detail

    - #### isInitialized

          boolean isInitialized()

    - #### isKnown

          boolean isKnown(Hash key)

    - #### get

          DatabaseEntry get(Hash key)

    - #### get

          DatabaseEntry get(Hash key,
                          boolean persist)

    - #### put

          boolean put(Hash key,
                    DatabaseEntry data)

    - #### put

          boolean put(Hash key,
                    DatabaseEntry data,
                    boolean persist)

    - #### remove

          DatabaseEntry remove(Hash key)

    - #### remove

          DatabaseEntry remove(Hash key,
                             boolean persist)

    - #### getKeys

          Set<Hash> getKeys()

    - #### getEntries

          Collection<DatabaseEntry> getEntries()

      Since:
        0.8.3

    - #### getMapEntries

          Set<Map.Entry<Hash,DatabaseEntry>> getMapEntries()

      Since:
        0.8.3

    - #### stop

          void stop()

    - #### restart

          void restart()

    - #### rescan

          void rescan()

    - #### countLeaseSets

          int countLeaseSets()