Class ProjectCollectingCacheStore
java.lang.Object
com.e1c.langtool.internal.collector.ProjectCollectingCacheStore
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 Summary
ConstructorsConstructorDescriptionProjectCollectingCacheStore(org.eclipse.core.resources.IProject project, CollectingServiceRegistry collectingServiceRegistry) -
Method Summary
Modifier and TypeMethodDescriptionIterator<org.eclipse.core.runtime.IPath>Gets all invalidated resources of the project.Iterator<org.eclipse.core.runtime.IPath>Gets all resources of the project that may have cache data.voidclose()Close the store.voiddelete()Delete the store files from disk.getInterface(org.eclipse.core.runtime.IPath path) getModel(org.eclipse.core.runtime.IPath path) getModelComputed(org.eclipse.core.runtime.IPath path) booleaninvalidate(org.eclipse.core.runtime.IPath path) Invalidate all cache for given path.booleanInvalidate all collected cache of resources.static booleanisCacheExist(org.eclipse.core.resources.IProject project) Checks if the cache is exist for the project.booleanisInvalidated(org.eclipse.core.runtime.IPath path) Checks if the path is invalidated and may have cache data.voidopen()Open existing store or initialize new store.voidputInterface(org.eclipse.core.runtime.IPath path, Collection<FeatureValue> values) voidputModel(org.eclipse.core.runtime.IPath path, Collection<FeatureValue> values) voidputModelComputed(org.eclipse.core.runtime.IPath path, Collection<FeatureValue> values) booleanremove(org.eclipse.core.runtime.IPath path)
-
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 benull.- 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 benull.- 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 benull.- 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
Gets all invalidated resources of the project.- Returns:
- the iterator of invalidated resource paths of the project. May contain removed resources.
-
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
-
getModel
-
getModelComputed
-
putInterface
-
putModel
-
putModelComputed
-