public class InMemoryStatsStorage extends BaseCollectionStatsStorage
FileStatsStorage
or MapDBStatsStorage
.MapDBStatsStorage
BaseCollectionStatsStorage.SessionTypeId, BaseCollectionStatsStorage.SessionTypeWorkerId
listeners, sessionIDs, staticInfo, storageMetaData, updates
Constructor and Description |
---|
InMemoryStatsStorage() |
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)
|
java.lang.String |
toString() |
checkStorageEvents, deregisterStatsStorageListener, getAllStaticInfos, getAllUpdatesAfter, getAllUpdatesAfter, getLatestUpdate, getLatestUpdateAllWorkers, getListeners, getNumUpdateRecordsFor, getNumUpdateRecordsFor, getStaticInfo, getStorageMetaData, getUpdate, listSessionIDs, listTypeIDsForSession, listWorkerIDsForSession, listWorkerIDsForSessionAndType, notifyListeners, putStaticInfo, putStorageMetaData, putUpdate, registerStatsStorageListener, removeAllListeners, sessionExists
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 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 storepublic void close() throws java.io.IOException
StatsStorage
java.io.IOException
public boolean isClosed()
public java.lang.String toString()
toString
in class java.lang.Object