@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 ICodeReaderCache
key
- the path of the CodeReader to retrievepublic CodeReader get(String key, IIndexFileLocation ifl) throws org.eclipse.core.runtime.CoreException, IOException
ICodeReaderCache
get
in interface ICodeReaderCache
key
- the path corresponding to the CodeReader, generally:
fileToParse.getLocation().toOSString()IOException
org.eclipse.core.runtime.CoreException
public void setCacheSize(int size)
size
- public CodeReader remove(String key)
remove
in interface ICodeReaderCache
key
- public int getCurrentSpace()
getCurrentSpace
in interface ICodeReaderCache
public void flush()
flush
in interface ICodeReaderCache
Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.