Class MetricStorage
java.lang.Object
com.e1c.langtool.internal.stat.db.MetricStorage
- Direct Known Subclasses:
LanguageMetricStorage,ResourceIndexMetricStorage
The abstract storage of metric values allows to store collection by id of resource and total value.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterOpenDb(org.mapdb.DB db) protected voidprotected voidvoidclose()Close the store.voiddelete()Delete the store files from disk.getMetricValues(long id) voidopen()Open the storage from file.putMetricValues(long id, MetricValues data) removeMetricValues(long id) voidsetTotalValues(MetricValues totalValues)
-
Field Details
-
initLock
-
-
Constructor Details
-
MetricStorage
Instantiates a new metric storage.- Parameters:
dbFile- the DB file, cannot benull.
-
-
Method Details
-
getTotalValues
-
setTotalValues
-
getMetricValues
-
putMetricValues
-
removeMetricValues
-
open
public void open()Open the storage from file. -
close
public void close()Close the store. -
delete
public void delete()Delete the store files from disk. -
beforeClose
protected void beforeClose() -
checkOrOpen
protected void checkOrOpen() -
afterOpenDb
protected void afterOpenDb(org.mapdb.DB db)
-