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_contextprotected Log_log -
Constructor Summary
Constructors Constructor Description TransientDataStore(RouterContext ctx) -
Method Summary
Modifier and Type Method Description intcountLeaseSets()DatabaseEntryget(Hash key)DatabaseEntryget(Hash key, boolean persist)for PersistentDataStore only - don't use hereCollection<DatabaseEntry>getEntries()Set<Hash>getKeys()Set<Map.Entry<Hash,DatabaseEntry>>getMapEntries()booleanisInitialized()booleanisKnown(Hash key)booleanput(Hash key, DatabaseEntry data)booleanput(Hash key, DatabaseEntry data, boolean persist)for PersistentDataStore only - don't use hereDatabaseEntryremove(Hash key)DatabaseEntryremove(Hash key, boolean persist)for PersistentDataStore only - don't use herevoidrescan()voidrestart()intsize()voidstop()StringtoString()
-
Field Details
-
Constructor Details
-
Method Details
-
isInitialized
public boolean isInitialized()- Specified by:
isInitializedin interfaceDataStore
-
stop
public void stop() -
restart
public void restart() -
rescan
public void rescan() -
size
public int size() -
getKeys
-
getEntries
- Specified by:
getEntriesin interfaceDataStore- Returns:
- Unmodifiable view, not a copy
- Since:
- 0.8.3
-
getMapEntries
- Specified by:
getMapEntriesin interfaceDataStore- Returns:
- Unmodifiable view, not a copy
- Since:
- 0.8.3
-
get
for PersistentDataStore only - don't use here- Specified by:
getin interfaceDataStore- Throws:
UnsupportedOperationException- always
-
get
-
isKnown
-
countLeaseSets
public int countLeaseSets()- Specified by:
countLeaseSetsin interfaceDataStore
-
put
for PersistentDataStore only - don't use here- Specified by:
putin interfaceDataStore- Throws:
UnsupportedOperationException- always
-
put
-
toString
-
remove
for PersistentDataStore only - don't use here- Specified by:
removein interfaceDataStore- Throws:
UnsupportedOperationException- always
-
remove
-