Package org.eclipse.cdt.core.parser
Interface ICodeReaderCache
- All Known Implementing Classes:
CodeReaderCache
Deprecated.
This is the interface to a cache for CodeReaders.
For thread safety the implementations of this interface must ensure that their methods are thread safe.
- Restriction:
- This interface is not intended to be referenced by clients.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
flush()
Deprecated.Deprecated.Retrieves the CodeReader corresponding to the key specified that represents the path for that CodeReader.get
(String key, IIndexFileLocation ifl) Deprecated.Retrieves the CodeReader corresponding to the key specified that represents the path for that CodeReader.int
Deprecated.Returns the amount of space that the cache is using.Deprecated.Used to remove the CodeReader corresponding to the path specified by key from the cache.
-
Method Details
-
get
Deprecated.Retrieves the CodeReader corresponding to the key specified that represents the path for that CodeReader. If no CodeReader is found in the cache then a new CodeReader is created for the path and then returned.- Parameters:
key
- the path corresponding to the CodeReader, generally: fileToParse.getLocation().toOSString()- Returns:
- the CodeReader corresponding to the path specified by the key
-
get
CodeReader get(String key, IIndexFileLocation ifl) throws org.eclipse.core.runtime.CoreException, IOException Deprecated.Retrieves the CodeReader corresponding to the key specified that represents the path for that CodeReader. If no CodeReader is found in the cache then a new CodeReader is created for the ifl and then returned.- Parameters:
key
- the path corresponding to the CodeReader, generally: fileToParse.getLocation().toOSString()- Returns:
- the CodeReader corresponding to the path specified by the key
- Throws:
IOException
org.eclipse.core.runtime.CoreException
- Since:
- 5.1
-
remove
Deprecated.Used to remove the CodeReader corresponding to the path specified by key from the cache.- Parameters:
key
- the path of the CodeReader to be removed- Returns:
- the removed CodeReader or null if not found
-
getCurrentSpace
int getCurrentSpace()Deprecated.Returns the amount of space that the cache is using. The units are relative to the implementation of the cache. It could be the total number of objects in the cache, or the total space the cache is using in MB. -
flush
void flush()Deprecated.
-