@EngineService(injectDefaultToWorkflow=true, isCoreEngine=true) public class MemoryMapCacheEngine extends ScheduledCacheEngine
AbstractCacheEngine.CacheResult
Constructor and Description |
---|
MemoryMapCacheEngine(Boolean work,
int timeToLiveSeconds,
Boolean bestEffort)
Builds a new engine.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears this cache.
|
AbstractCacheEngine.CacheResult |
getFromCache(EngineRequest.Key request)
Gets the list of nuts associated to the specified request from the cache.
|
void |
putToCache(EngineRequest.Key request,
AbstractCacheEngine.CacheResult nuts)
Puts the given list of nuts associated to the specified request to the cache.
|
void |
removeFromCache(EngineRequest.Key request)
Removes the given list of nuts associated to the specified request from the cache.
|
run, setTimeToLive
getEngineType, internalParse, parse, works
parse, runChains
@ConfigConstructor public MemoryMapCacheEngine(@BooleanConfigParam(defaultValue=true,propertyKey="c.g.wuic.engine.cache") Boolean work, @IntegerConfigParam(defaultValue=-1,propertyKey="c.g.wuic.engine.timeToLive") int timeToLiveSeconds, @BooleanConfigParam(defaultValue=false,propertyKey="c.g.wuic.engine.bestEffort") Boolean bestEffort)
Builds a new engine.
work
- if cache should be activated or nottimeToLiveSeconds
- the time this cache could livebestEffort
- enable best effort mode or notpublic void putToCache(EngineRequest.Key request, AbstractCacheEngine.CacheResult nuts)
Puts the given list of nuts associated to the specified request to the cache.
putToCache
in class AbstractCacheEngine
request
- the request keynuts
- the nutspublic void removeFromCache(EngineRequest.Key request)
Removes the given list of nuts associated to the specified request from the cache.
removeFromCache
in class AbstractCacheEngine
request
- request keypublic AbstractCacheEngine.CacheResult getFromCache(EngineRequest.Key request)
Gets the list of nuts associated to the specified request from the cache.
getFromCache
in class AbstractCacheEngine
request
- the request keypublic void clearCache()
Clears this cache.
clearCache
in class ScheduledCacheEngine
Copyright © 2012-2015. All Rights Reserved.