net.i2p.router.networkdb.kademlia
Class TransientDataStore
java.lang.Object
net.i2p.router.networkdb.kademlia.TransientDataStore
- All Implemented Interfaces:
- DataStore
- Direct Known Subclasses:
- PersistentDataStore
class TransientDataStore
- extends Object
- implements DataStore
_context
protected RouterContext _context
TransientDataStore
public TransientDataStore(RouterContext ctx)
isInitialized
public boolean isInitialized()
- Specified by:
isInitialized
in interface DataStore
stop
public void stop()
- Specified by:
stop
in interface DataStore
restart
public void restart()
- Specified by:
restart
in interface DataStore
rescan
public void rescan()
- Specified by:
rescan
in interface DataStore
getKeys
public Set<Hash> getKeys()
- Specified by:
getKeys
in interface DataStore
get
public DataStructure get(Hash key,
boolean persist)
- for PersistentDataStore only - don't use here @throws IAE always
- Specified by:
get
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
countLeaseSets
public int countLeaseSets()
- Specified by:
countLeaseSets
in interface DataStore
put
public boolean put(Hash key,
DataStructure data,
boolean persist)
- for PersistentDataStore only - don't use here @throws IAE always
- Specified by:
put
in interface DataStore
put
public boolean put(Hash key,
DataStructure data)
- Specified by:
put
in interface DataStore
- Parameters:
data
- must be validated before here
- Returns:
- success
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
remove
public DataStructure remove(Hash key,
boolean persist)
- for PersistentDataStore only - don't use here
- Specified by:
remove
in interface DataStore
remove
public DataStructure remove(Hash key)
- Specified by:
remove
in interface DataStore