Package net.didion.jwnl.dictionary
Class AbstractCachingDictionary
- java.lang.Object
-
- net.didion.jwnl.dictionary.Dictionary
-
- net.didion.jwnl.dictionary.AbstractCachingDictionary
-
- All Implemented Interfaces:
Installable
- Direct Known Subclasses:
DatabaseBackedDictionary
,FileBackedDictionary
public abstract class AbstractCachingDictionary extends Dictionary
ExtendsDictionary
to provide caching of elements.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCachingDictionary()
protected
AbstractCachingDictionary(boolean enableCaching)
protected
AbstractCachingDictionary(MorphologicalProcessor morph)
protected
AbstractCachingDictionary(MorphologicalProcessor morph, boolean enableCaching)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
protected Exc
getCachedException(POSKey key)
protected IndexWord
getCachedIndexWord(POSKey key)
protected Synset
getCachedSynset(POSKey key)
int
getCacheSizes(DictionaryElementType type)
boolean
isCachingEnabled()
void
setCacheCapacity(int size)
void
setCacheCapacity(DictionaryElementType type, int size)
void
setCachingEnabled(boolean cachingEnabled)
-
Methods inherited from class net.didion.jwnl.dictionary.Dictionary
close, getException, getExceptionIterator, getIndexWord, getIndexWordIterator, getIndexWordIterator, getInstance, getMorphologicalProcessor, getRandomIndexWord, getSynsetAt, getSynsetIterator, lookupAllIndexWords, lookupIndexWord, prepareQueryString, setDictionary, uninstall
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.didion.jwnl.util.factory.Installable
install
-
-
-
-
Constructor Detail
-
AbstractCachingDictionary
protected AbstractCachingDictionary()
-
AbstractCachingDictionary
protected AbstractCachingDictionary(boolean enableCaching)
-
AbstractCachingDictionary
protected AbstractCachingDictionary(MorphologicalProcessor morph)
-
AbstractCachingDictionary
protected AbstractCachingDictionary(MorphologicalProcessor morph, boolean enableCaching)
-
-
Method Detail
-
isCachingEnabled
public boolean isCachingEnabled()
-
setCachingEnabled
public void setCachingEnabled(boolean cachingEnabled)
-
getCacheSizes
public int getCacheSizes(DictionaryElementType type)
-
getCacheCapacity
public int getCacheCapacity(DictionaryElementType type)
-
setCacheCapacity
public void setCacheCapacity(int size)
-
setCacheCapacity
public void setCacheCapacity(DictionaryElementType type, int size)
-
clearCache
public void clearCache()
-
clearCache
public void clearCache(DictionaryElementType elementType)
-
-