|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.core.parser.CodeReaderCache
public class CodeReaderCache
This is the CodeReaderBuffer used to cache CodeReaders for the ICodeReaderFactory when working with saved copies (primarily SavedCodeReaderFactory).
Field Summary | |
---|---|
static java.lang.String |
CODE_READER_BUFFER
The string used to identify this CodeReaderCache. |
static int |
DEFAULT_CACHE_SIZE_IN_MB
The default size of the cache in MB. |
static java.lang.String |
DEFAULT_CACHE_SIZE_IN_MB_STRING
A String value of the default size of the cache. |
Constructor Summary | |
---|---|
CodeReaderCache(int size)
Creates a CodeReaderCache and sets the size of the CodeReaderCache in MB. |
Method Summary | |
---|---|
void |
flush()
|
org.eclipse.cdt.core.parser.CodeReader |
get(java.lang.String key)
Get a CodeReader from the cache. |
int |
getCurrentSpace()
Returns the current size of the cache. |
org.eclipse.cdt.core.parser.CodeReader |
remove(java.lang.String key)
Removes the CodeReader from the cache corresponding to the path specified by the key and returns the CodeReader that was removed. |
void |
setCacheSize(int size)
Sets the max cache size of this cache in terms of MB. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CODE_READER_BUFFER
public static final int DEFAULT_CACHE_SIZE_IN_MB
public static final java.lang.String DEFAULT_CACHE_SIZE_IN_MB_STRING
Constructor Detail |
---|
public CodeReaderCache(int size)
size
- initial size of the CodeReaderCache in terms of MBMethod Detail |
---|
public org.eclipse.cdt.core.parser.CodeReader get(java.lang.String key)
get
in interface org.eclipse.cdt.core.parser.ICodeReaderCache
key
- the path of the CodeReader to retrieve
public void setCacheSize(int size)
size
- public org.eclipse.cdt.core.parser.CodeReader remove(java.lang.String key)
remove
in interface org.eclipse.cdt.core.parser.ICodeReaderCache
key
- public int getCurrentSpace()
getCurrentSpace
in interface org.eclipse.cdt.core.parser.ICodeReaderCache
public void flush()
flush
in interface org.eclipse.cdt.core.parser.ICodeReaderCache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |