Class ResourceIndexMetricStorage
java.lang.Object
com.e1c.langtool.internal.stat.db.MetricStorage
com.e1c.langtool.internal.stat.db.ResourceIndexMetricStorage
The storage contains resource index and store base metric values of the project.
-
Field Summary
Fields inherited from class com.e1c.langtool.internal.stat.db.MetricStorage
initLock -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new resource index metric storage. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterOpenDb(org.mapdb.DB db) protected voidgetResourceId(org.eclipse.core.runtime.IPath path) Gets the stored resource id.longgetResourceIdOrNew(org.eclipse.core.runtime.IPath path) Gets the stored resource id or create new ID and store it.Methods inherited from class com.e1c.langtool.internal.stat.db.MetricStorage
checkOrOpen, close, delete, getMetricValues, getTotalValues, open, putMetricValues, removeMetricValues, setTotalValues
-
Constructor Details
-
ResourceIndexMetricStorage
Instantiates a new resource index metric storage.- Parameters:
file- the DB file, cannot benull.
-
-
Method Details
-
getResources
-
getResourceId
Gets the stored resource id.- Parameters:
path- the path, cannot benull.- Returns:
- the resource id, may return
nullif this resource was not used or if the path is empty.
-
getResourceIdOrNew
public long getResourceIdOrNew(org.eclipse.core.runtime.IPath path) Gets the stored resource id or create new ID and store it. This method always return 0 if path is empty.- Parameters:
path- the path, cannot benull.- Returns:
- the resource id or new, cannot return
null.
-
afterOpenDb
protected void afterOpenDb(org.mapdb.DB db) - Overrides:
afterOpenDbin classMetricStorage
-
beforeClose
protected void beforeClose()- Overrides:
beforeClosein classMetricStorage
-