DataStore
PersistentDataStore
class TransientDataStore extends Object implements DataStore
Modifier and Type | Field | Description |
---|---|---|
protected RouterContext |
_context |
|
protected Log |
_log |
Constructor | Description |
---|---|
TransientDataStore(RouterContext ctx) |
Modifier and Type | Method | Description |
---|---|---|
int |
countLeaseSets() |
|
DatabaseEntry |
get(Hash key) |
|
DatabaseEntry |
get(Hash key,
boolean persist) |
for PersistentDataStore only - don't use here
|
Collection<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 here
|
DatabaseEntry |
remove(Hash key) |
|
DatabaseEntry |
remove(Hash key,
boolean persist) |
for PersistentDataStore only - don't use here
|
void |
rescan() |
|
void |
restart() |
|
int |
size() |
|
void |
stop() |
|
String |
toString() |
protected final Log _log
protected final RouterContext _context
public TransientDataStore(RouterContext ctx)
public boolean isInitialized()
isInitialized
in interface DataStore
public int size()
public Collection<DatabaseEntry> getEntries()
getEntries
in interface DataStore
public Set<Map.Entry<Hash,DatabaseEntry>> getMapEntries()
getMapEntries
in interface DataStore
public DatabaseEntry get(Hash key, boolean persist)
get
in interface DataStore
UnsupportedOperationException
- alwayspublic DatabaseEntry get(Hash key)
public int countLeaseSets()
countLeaseSets
in interface DataStore
public boolean put(Hash key, DatabaseEntry data, boolean persist)
put
in interface DataStore
UnsupportedOperationException
- alwayspublic boolean put(Hash key, DatabaseEntry data)
public DatabaseEntry remove(Hash key, boolean persist)
remove
in interface DataStore
UnsupportedOperationException
- alwayspublic DatabaseEntry remove(Hash key)