Class ProjectCollectingCacheStore

java.lang.Object
com.e1c.langtool.internal.collector.ProjectCollectingCacheStore

public class ProjectCollectingCacheStore extends Object
The MapDB store of project collecting cache. This class separately stores common index of IPath and reset heavy data of collecting content.
See Also:
  • Constructor Details

    • ProjectCollectingCacheStore

      public ProjectCollectingCacheStore(org.eclipse.core.resources.IProject project, CollectingServiceRegistry collectingServiceRegistry)
  • Method Details

    • isCacheExist

      public static boolean isCacheExist(org.eclipse.core.resources.IProject project)
      Checks if the cache is exist for the project.
      Parameters:
      project - the project, cannot be null.
      Returns:
      true, if the cache is exist
    • open

      public void open()
      Open existing store or initialize new store.
    • close

      public void close()
      Close the store.
    • delete

      public void delete()
      Delete the store files from disk.
    • invalidate

      public boolean invalidate(org.eclipse.core.runtime.IPath path)
      Invalidate all cache for given path.
      Parameters:
      path - the path, cannot be null.
      Returns:
      true, if cache exited for the path and was removed
    • isInvalidated

      public boolean isInvalidated(org.eclipse.core.runtime.IPath path)
      Checks if the path is invalidated and may have cache data.
      Parameters:
      path - the path, cannot be null.
      Returns:
      true, if the pasth is invalidated
    • invalidateAll

      public boolean invalidateAll()
      Invalidate all collected cache of resources.
      Returns:
      true, if was any cache data for resources and they invalidated
    • allInvalidated

      public Iterator<org.eclipse.core.runtime.IPath> allInvalidated()
      Gets all invalidated resources of the project.
      Returns:
      the iterator of invalidated resource paths of the project. May contain removed resources.
    • allResources

      public Iterator<org.eclipse.core.runtime.IPath> allResources()
      Gets all resources of the project that may have cache data.
      Returns:
      the iterator of all project resources that may have cache data.
    • remove

      public boolean remove(org.eclipse.core.runtime.IPath path)
    • getInterface

      public Collection<FeatureValue> getInterface(org.eclipse.core.runtime.IPath path)
    • getModel

      public Collection<FeatureValue> getModel(org.eclipse.core.runtime.IPath path)
    • getModelComputed

      public Collection<FeatureValue> getModelComputed(org.eclipse.core.runtime.IPath path)
    • putInterface

      public void putInterface(org.eclipse.core.runtime.IPath path, Collection<FeatureValue> values)
    • putModel

      public void putModel(org.eclipse.core.runtime.IPath path, Collection<FeatureValue> values)
    • putModelComputed

      public void putModelComputed(org.eclipse.core.runtime.IPath path, Collection<FeatureValue> values)