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.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
_context
protected RouterContext _context
PersistentDataStore
public PersistentDataStore(RouterContext ctx,
java.lang.String dbDir,
KademliaNetworkDatabaseFacade facade)
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
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()