Class AbstractCachingDictionary
java.lang.Object
net.didion.jwnl.dictionary.Dictionary
net.didion.jwnl.dictionary.AbstractCachingDictionary
- All Implemented Interfaces:
Installable
- Direct Known Subclasses:
DatabaseBackedDictionary, FileBackedDictionary
Extends
Dictionary to provide caching of elements.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAbstractCachingDictionary(boolean enableCaching) protectedprotectedAbstractCachingDictionary(MorphologicalProcessor morph, boolean enableCaching) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcacheException(POSKey key, Exc exception) protected voidcacheIndexWord(POSKey key, IndexWord word) protected voidcacheSynset(POSKey key, Synset synset) voidvoidclearCache(DictionaryElementType elementType) intprotected ExcgetCachedException(POSKey key) protected IndexWordgetCachedIndexWord(POSKey key) protected SynsetgetCachedSynset(POSKey key) intbooleanvoidsetCacheCapacity(int size) voidsetCacheCapacity(DictionaryElementType type, int size) voidsetCachingEnabled(boolean cachingEnabled) Methods inherited from class Dictionary
close, getException, getExceptionIterator, getIndexWord, getIndexWordIterator, getIndexWordIterator, getInstance, getMorphologicalProcessor, getRandomIndexWord, getSynsetAt, getSynsetIterator, lookupAllIndexWords, lookupIndexWord, prepareQueryString, setDictionary, uninstallMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Installable
install
-
Constructor Details
-
AbstractCachingDictionary
protected AbstractCachingDictionary() -
AbstractCachingDictionary
protected AbstractCachingDictionary(boolean enableCaching) -
AbstractCachingDictionary
-
AbstractCachingDictionary
-
-
Method Details
-
isCachingEnabled
public boolean isCachingEnabled() -
setCachingEnabled
public void setCachingEnabled(boolean cachingEnabled) -
getCacheSizes
-
getCacheCapacity
-
setCacheCapacity
public void setCacheCapacity(int size) -
setCacheCapacity
-
clearCache
public void clearCache() -
clearCache
-
cacheIndexWord
-
getCachedIndexWord
-
cacheSynset
-
getCachedSynset
-
cacheException
-
getCachedException
-