public abstract class AbstractCachingDictionary extends Dictionary
Dictionary to provide caching of elements.| Modifier and Type | Class and Description |
|---|---|
private static class |
AbstractCachingDictionary.DictionaryCacheSet |
private static class |
AbstractCachingDictionary.ObservableCache |
| Modifier and Type | Field and Description |
|---|---|
private AbstractCachingDictionary.DictionaryCacheSet |
_caches |
private boolean |
_isCachingEnabled |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCachingDictionary() |
protected |
AbstractCachingDictionary(boolean enableCaching) |
protected |
AbstractCachingDictionary(MorphologicalProcessor morph) |
protected |
AbstractCachingDictionary(MorphologicalProcessor morph,
boolean enableCaching) |
| Modifier and Type | Method and Description |
|---|---|
private void |
cache(DictionaryElementType fileType,
POSKey key,
java.lang.Object obj) |
protected void |
cacheException(POSKey key,
Exc exception) |
protected void |
cacheIndexWord(POSKey key,
IndexWord word) |
protected void |
cacheSynset(POSKey key,
Synset synset) |
void |
clearCache() |
void |
clearCache(DictionaryElementType elementType) |
int |
getCacheCapacity(DictionaryElementType type) |
private java.lang.Object |
getCached(DictionaryElementType fileType,
POSKey key) |
protected Exc |
getCachedException(POSKey key) |
protected IndexWord |
getCachedIndexWord(POSKey key) |
protected Synset |
getCachedSynset(POSKey key) |
private AbstractCachingDictionary.DictionaryCacheSet |
getCaches() |
int |
getCacheSizes(DictionaryElementType type) |
boolean |
isCachingEnabled() |
void |
setCacheCapacity(DictionaryElementType type,
int size) |
void |
setCacheCapacity(int size) |
void |
setCachingEnabled(boolean cachingEnabled) |
close, getException, getExceptionIterator, getIndexWord, getIndexWordIterator, getIndexWordIterator, getInstance, getMorphologicalProcessor, getRandomIndexWord, getSynsetAt, getSynsetIterator, lookupAllIndexWords, lookupIndexWord, prepareQueryString, setDictionary, uninstallclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinstallprivate AbstractCachingDictionary.DictionaryCacheSet _caches
private boolean _isCachingEnabled
protected AbstractCachingDictionary()
protected AbstractCachingDictionary(boolean enableCaching)
protected AbstractCachingDictionary(MorphologicalProcessor morph)
protected AbstractCachingDictionary(MorphologicalProcessor morph, boolean enableCaching)
public boolean isCachingEnabled()
public void setCachingEnabled(boolean cachingEnabled)
public int getCacheSizes(DictionaryElementType type)
public int getCacheCapacity(DictionaryElementType type)
public void setCacheCapacity(int size)
public void setCacheCapacity(DictionaryElementType type, int size)
public void clearCache()
public void clearCache(DictionaryElementType elementType)
private AbstractCachingDictionary.DictionaryCacheSet getCaches()
private void cache(DictionaryElementType fileType, POSKey key, java.lang.Object obj)
private java.lang.Object getCached(DictionaryElementType fileType, POSKey key)