Class ResourceIndexMetricStorage

java.lang.Object
com.e1c.langtool.internal.stat.db.MetricStorage
com.e1c.langtool.internal.stat.db.ResourceIndexMetricStorage

public class ResourceIndexMetricStorage extends MetricStorage
The storage contains resource index and store base metric values of the project.
  • Constructor Details

    • ResourceIndexMetricStorage

      public ResourceIndexMetricStorage(File file)
      Instantiates a new resource index metric storage.
      Parameters:
      file - the DB file, cannot be null.
  • Method Details

    • getResources

      public Map<org.eclipse.core.runtime.IPath,Long> getResources()
    • getResourceId

      public Long getResourceId(org.eclipse.core.runtime.IPath path)
      Gets the stored resource id.
      Parameters:
      path - the path, cannot be null.
      Returns:
      the resource id, may return null if 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 be null.
      Returns:
      the resource id or new, cannot return null.
    • afterOpenDb

      protected void afterOpenDb(org.mapdb.DB db)
      Overrides:
      afterOpenDb in class MetricStorage
    • beforeClose

      protected void beforeClose()
      Overrides:
      beforeClose in class MetricStorage