public class MapDBStatsStorage extends BaseCollectionStatsStorage
StatsStorage
interface, backed by MapDB (in-memory or file).InMemoryStatsStorage
and FileStatsStorage
Modifier and Type | Class and Description |
---|---|
static class |
MapDBStatsStorage.Builder |
BaseCollectionStatsStorage.SessionTypeId, BaseCollectionStatsStorage.SessionTypeWorkerId
listeners, sessionIDs, staticInfo, storageMetaData, updates
Constructor and Description |
---|
MapDBStatsStorage() |
MapDBStatsStorage(java.io.File f) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close any open resources (files, etc)
|
protected java.util.Map<java.lang.Long,Persistable> |
getUpdateMap(java.lang.String sessionID,
java.lang.String typeID,
java.lang.String workerID,
boolean createIfRequired) |
boolean |
isClosed() |
void |
putStaticInfo(Persistable staticInfo)
Static info: reported once per session, upon initialization
|
void |
putStorageMetaData(StorageMetaData storageMetaData)
Method to store some additional metadata for each session.
|
void |
putUpdate(Persistable update)
Updates: stored multiple times per session (periodically, for example)
|
checkStorageEvents, deregisterStatsStorageListener, getAllStaticInfos, getAllUpdatesAfter, getAllUpdatesAfter, getLatestUpdate, getLatestUpdateAllWorkers, getListeners, getNumUpdateRecordsFor, getNumUpdateRecordsFor, getStaticInfo, getStorageMetaData, getUpdate, listSessionIDs, listTypeIDsForSession, listWorkerIDsForSession, listWorkerIDsForSessionAndType, notifyListeners, putStaticInfo, putStorageMetaData, putUpdate, registerStatsStorageListener, removeAllListeners, sessionExists
public MapDBStatsStorage()
public MapDBStatsStorage(java.io.File f)
protected java.util.Map<java.lang.Long,Persistable> getUpdateMap(java.lang.String sessionID, java.lang.String typeID, java.lang.String workerID, boolean createIfRequired)
getUpdateMap
in class BaseCollectionStatsStorage
public void close()
StatsStorage
public boolean isClosed()
public void putStaticInfo(Persistable staticInfo)
StatsStorageRouter
putStaticInfo
in interface StatsStorageRouter
putStaticInfo
in class BaseCollectionStatsStorage
staticInfo
- Static info to storepublic void putUpdate(Persistable update)
StatsStorageRouter
putUpdate
in interface StatsStorageRouter
putUpdate
in class BaseCollectionStatsStorage
update
- Update info to storepublic void putStorageMetaData(StorageMetaData storageMetaData)
StatsStorageRouter
putStorageMetaData
in interface StatsStorageRouter
putStorageMetaData
in class BaseCollectionStatsStorage
storageMetaData
- Storage metadata to store