@Deprecated public class CodeReaderCache extends Object implements ICodeReaderCache
| Modifier and Type | Field and Description |
|---|---|
static String |
CODE_READER_BUFFER
Deprecated.
The string used to identify this CodeReaderCache.
|
static int |
DEFAULT_CACHE_SIZE_IN_MB
Deprecated.
The default size of the cache in MB.
|
static String |
DEFAULT_CACHE_SIZE_IN_MB_STRING
Deprecated.
A String value of the default size of the cache.
|
| Constructor and Description |
|---|
CodeReaderCache(int size)
Deprecated.
Creates a CodeReaderCache and sets the size of the CodeReaderCache in MB.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize()
Deprecated.
|
void |
flush()
Deprecated.
|
CodeReader |
get(String key)
Deprecated.
Get a CodeReader from the cache.
|
CodeReader |
get(String key,
IIndexFileLocation ifl)
Deprecated.
Retrieves the CodeReader corresponding to the key specified that represents the
path for that CodeReader.
|
int |
getCurrentSpace()
Deprecated.
Returns the current size of the cache.
|
CodeReader |
remove(String key)
Deprecated.
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)
Deprecated.
Sets the max cache size of this cache in terms of MB.
|
public static final String CODE_READER_BUFFER
public static final int DEFAULT_CACHE_SIZE_IN_MB
public static final String DEFAULT_CACHE_SIZE_IN_MB_STRING
public CodeReaderCache(int size)
size - initial size of the CodeReaderCache in terms of MBprotected void finalize()
throws Throwable
public CodeReader get(String key)
get in interface ICodeReaderCachekey - the path of the CodeReader to retrievepublic CodeReader get(String key, IIndexFileLocation ifl) throws org.eclipse.core.runtime.CoreException, IOException
ICodeReaderCacheget in interface ICodeReaderCachekey - the path corresponding to the CodeReader, generally:
fileToParse.getLocation().toOSString()IOExceptionorg.eclipse.core.runtime.CoreExceptionpublic void setCacheSize(int size)
size - public CodeReader remove(String key)
remove in interface ICodeReaderCachekey - public int getCurrentSpace()
getCurrentSpace in interface ICodeReaderCachepublic void flush()
flush in interface ICodeReaderCacheCopyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.