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
Stores in-memory only. See extension.
-
Field Summary
Fields Modifier and Type Field Description protected RouterContext
_context
protected Log
_log
-
Constructor Summary
Constructors Constructor Description TransientDataStore(RouterContext ctx)
-
Method Summary
Modifier and Type Method Description int
countLeaseSets()
DatabaseEntry
get(Hash key)
DatabaseEntry
get(Hash key, boolean persist)
for PersistentDataStore only - don't use hereCollection<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)
for PersistentDataStore only - don't use hereDatabaseEntry
remove(Hash key)
DatabaseEntry
remove(Hash key, boolean persist)
for PersistentDataStore only - don't use herevoid
rescan()
void
restart()
int
size()
void
stop()
String
toString()
-
Field Details
-
Constructor Details
-
Method Details
-
isInitialized
public boolean isInitialized()- Specified by:
isInitialized
in interfaceDataStore
-
stop
public void stop() -
restart
public void restart() -
rescan
public void rescan() -
size
public int size() -
getKeys
-
getEntries
- Specified by:
getEntries
in interfaceDataStore
- Returns:
- Unmodifiable view, not a copy
- Since:
- 0.8.3
-
getMapEntries
- Specified by:
getMapEntries
in interfaceDataStore
- Returns:
- Unmodifiable view, not a copy
- Since:
- 0.8.3
-
get
for PersistentDataStore only - don't use here- Specified by:
get
in interfaceDataStore
- Throws:
UnsupportedOperationException
- always
-
get
-
isKnown
-
countLeaseSets
public int countLeaseSets()- Specified by:
countLeaseSets
in interfaceDataStore
-
put
for PersistentDataStore only - don't use here- Specified by:
put
in interfaceDataStore
- Throws:
UnsupportedOperationException
- always
-
put
-
toString
-
remove
for PersistentDataStore only - don't use here- Specified by:
remove
in interfaceDataStore
- Throws:
UnsupportedOperationException
- always
-
remove
-