public abstract class LeoCachingAnnotator extends LeoBaseAnnotator
Modifier and Type | Field and Description |
---|---|
protected net.sf.ehcache.CacheManager |
cacheManager
Cache manager for getting a cache.
|
excludeTypesFilter, includeTypesFilter, inputTypes, logger, name, numberOfCASesProcessed, numberOfFilteredCASesProcessed, numInstances, outputType, typeSystemDescription
Constructor and Description |
---|
LeoCachingAnnotator()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addResultToCache(Serializable key,
Serializable value)
Add a key/value to the cache.
|
protected void |
createCache()
Create the cache to be used for storing results.
|
net.sf.ehcache.Cache |
getCache()
Get the cache.
|
String |
getCacheName()
Returns the ehcache name for this annotator.
|
protected Object |
getResultFromCache(Serializable key)
Look in the cache for input and return the result.
|
addLeoTypeSystemDescription, addOutputAnnotation, addOutputAnnotation, annotate, collectionProcessComplete, containsAnnotationInList, getAnnotationListForType, getDescriptor, getExcludeTypesFilter, getIncludeTypesFilter, getInputTypes, getLeoAEDescriptor, getLeoTypeSystemDescription, getName, getNumberOfCASesProcessed, getNumberOfFilteredCASesProcessed, getNumInstances, getOutputType, getResourceAsInputStream, getResourceFileAsString, hasFilteredAnnotation, hasInputTypesAnnotation, initialize, process, resetNumberOfCASesProcessed, resetNumberOfFilteredCASesProcessed, setExcludeTypesFilter, setIncludeTypesFilter, setInputTypes, setLeoTypeSystemDescription, setName, setNumInstances, setOutputType
getRequiredCasInterface, process
getCasInstancesRequired, hasNext, next
protected net.sf.ehcache.CacheManager cacheManager
public final String getCacheName()
public final net.sf.ehcache.Cache getCache()
protected void createCache()
protected final void addResultToCache(Serializable key, Serializable value)
key
- the key of the result to be cached.value
- the value of the result to be cached.protected final Object getResultFromCache(Serializable key)
key
- the get to get result for.Copyright © 2018 Department of Veterans Affairs. All Rights Reserved.