Class FileStateCache
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.indexer.FileStateCache
Holds a cache that maps filenames (absolute paths on the local filesystem) to "up to date" states.
A file is "up to date" if its content is known to be in sync with the index. A file
is not up to date if there is any possibility that its content might be out of sync with the
index.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the entire cache.static FileStateCacheReturns the cache for the givenNdinstance.isUpToDate(String location)Returns true if the file at the given path is in sync with the index.voidInserts a new entry into the cache.voidRemoves a single entry from the cache.
-
Constructor Details
-
FileStateCache
public FileStateCache()
-
-
Method Details
-
isUpToDate
Returns true if the file at the given path is in sync with the index. Returns false if the file has already been tested and might be out-of-sync. Returns null if its status is unknown and needs to be tested.- Parameters:
location- an absolute path on the filesystem
-
getCache
Returns the cache for the givenNdinstance.- Returns:
- the cache for the given
Nd. Creates one if it doesn't exist yet.
-
put
Inserts a new entry into the cache.- Parameters:
location- absolute filesystem path to the fileresult- true if the file is definitely in sync with the index, false if there is any possibility of it being out of sync.
-
clear
public void clear()Clears the entire cache. -
remove
Removes a single entry from the cache.- Parameters:
location- absolute filesystem path to the file.
-