## net.i2p.router.networkdb.kademlia
Class PersistentDataStore

    java.lang.Object
      net.i2p.router.networkdb.kademlia.TransientDataStore
          net.i2p.router.networkdb.kademlia.PersistentDataStore

All Implemented Interfaces:
  DataStore

class PersistentDataStore
extends TransientDataStore

Write out keys to disk when we get them and periodically read ones we don't know about into memory, with newly read routers are also added to the routing table.

Field Summary
`protected RouterContext` `_context`

Constructor Summary
`PersistentDataStore(RouterContext ctx, java.lang.String dbDir, KademliaNetworkDatabaseFacade facade)`

Method Summary
`int` `countLeaseSets()`
`boolean` `equals(java.lang.Object obj)`
`DataStructure` `get(Hash key)`
`java.util.Set` `getKeys()`
`int` `hashCode()`
`boolean` `isKnown(Hash key)`
`void` `put(Hash key, DataStructure data)`
`DataStructure` `remove(Hash key)`
`void` `restart()`
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### _context

    protected RouterContext _context

Constructor Detail

### PersistentDataStore

    public PersistentDataStore(RouterContext ctx,
                               java.lang.String dbDir,
                               KademliaNetworkDatabaseFacade facade)

Method Detail

### restart

    public void restart()

  Specified by:
    `restart` in interface `DataStore`
  Overrides:
    `restart` in class `TransientDataStore`

### remove

    public DataStructure remove(Hash key)

  Specified by:
    `remove` in interface `DataStore`
  Overrides:
    `remove` in class `TransientDataStore`

### put

    public void put(Hash key,
                    DataStructure data)

  Specified by:
    `put` in interface `DataStore`
  Overrides:
    `put` in class `TransientDataStore`

### countLeaseSets

    public int countLeaseSets()

  Specified by:
    `countLeaseSets` in interface `DataStore`
  Overrides:
    `countLeaseSets` in class `TransientDataStore`

### getKeys

    public java.util.Set getKeys()

  Specified by:
    `getKeys` in interface `DataStore`

### get

    public DataStructure get(Hash key)

  Specified by:
    `get` in interface `DataStore`

### isKnown

    public boolean isKnown(Hash key)

  Specified by:
    `isKnown` in interface `DataStore`

### hashCode

    public int hashCode()

### equals

    public boolean equals(java.lang.Object obj)

### toString

    public java.lang.String toString()