Class AbstractAuxiliaryCache<K,V> 
java.lang.Object
org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCache<K,V> 
- All Implemented Interfaces:
- AuxiliaryCache<K,,- V> - ICache<K,,- V> - ICacheType
- Direct Known Subclasses:
- AbstractAuxiliaryCacheEventLogging,- AbstractRemoteCacheNoWaitFacade,- LateralCacheNoWait,- LateralCacheNoWaitFacade,- RemoteCacheNoWait
This holds convenience methods used by most auxiliary caches.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.commons.jcs3.engine.behavior.ICacheTypeICacheType.CacheType
- 
Field SummaryFields inherited from interface org.apache.commons.jcs3.engine.behavior.ICacheNAME_COMPONENT_DELIMITER
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected <T> ICacheEvent<T>createICacheEvent(String regionName, T key, String eventName) Logs an event if an event logger is configured.protected ICacheEvent<K>createICacheEvent(ICacheElement<K, V> item, String eventName) Logs an event if an event logger is configured.abstract ICacheElement<K,V> Gets the item from the cache.Allows it to be injected.Allows it to be injected.abstract StringGets the extra info for the event log.Returns the key matcher used by get matching.protected voidlogApplicationEvent(String source, String eventName, String optionalDetails) Logs an event if an event logger is configured.protected voidLogs an event if an event logger is configured.protected <T> voidlogICacheEvent(ICacheEvent<T> cacheEvent) Logs an event if an event logger is configured.protected Map<K,ICacheElement<K, V>> processGetMultiple(Set<K> keys) Gets multiple items from the cache based on the given set of keys.voidsetCacheEventLogger(ICacheEventLogger cacheEventLogger) Allows it to be injected.voidsetElementSerializer(IElementSerializer elementSerializer) Allows you to inject a custom serializer.voidsetKeyMatcher(IKeyMatcher<K> keyMatcher) Sets the key matcher used by get matching.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.jcs3.auxiliary.AuxiliaryCachegetAuxiliaryCacheAttributes, getKeySet, getStatisticsMethods inherited from interface org.apache.commons.jcs3.engine.behavior.ICachedispose, getCacheName, getMatching, getMultiple, getSize, getStats, getStatus, remove, removeAll, updateMethods inherited from interface org.apache.commons.jcs3.engine.behavior.ICacheTypegetCacheType
- 
Constructor Details- 
AbstractAuxiliaryCachepublic AbstractAuxiliaryCache()
 
- 
- 
Method Details- 
processGetMultipleGets multiple items from the cache based on the given set of keys.- Parameters:
- keys-
- Returns:
- a map of K key to ICacheElement<K, V> element, or an empty map if there is no data in cache for any of these keys
- Throws:
- IOException
 
- 
getGets the item from the cache.- Specified by:
- getin interface- ICache<K,- V> 
- Parameters:
- key-
- Returns:
- ICacheElement, a wrapper around the key, value, and attributes
- Throws:
- IOException
 
- 
createICacheEventLogs an event if an event logger is configured.- Parameters:
- item-
- eventName-
- Returns:
- ICacheEvent
 
- 
createICacheEventLogs an event if an event logger is configured.- Parameters:
- regionName-
- key-
- eventName-
- Returns:
- ICacheEvent
 
- 
logICacheEventLogs an event if an event logger is configured.- Parameters:
- cacheEvent-
 
- 
logApplicationEventLogs an event if an event logger is configured.- Parameters:
- source-
- eventName-
- optionalDetails-
 
- 
logErrorLogs an event if an event logger is configured.- Parameters:
- source-
- eventName-
- errorMessage-
 
- 
getEventLoggingExtraInfoGets the extra info for the event log.- Returns:
- IP, or disk location, etc.
 
- 
setCacheEventLoggerAllows it to be injected.- Specified by:
- setCacheEventLoggerin interface- AuxiliaryCache<K,- V> 
- Parameters:
- cacheEventLogger-
 
- 
getCacheEventLoggerAllows it to be injected.- Returns:
- cacheEventLogger
 
- 
setElementSerializerAllows you to inject a custom serializer. A good example would be a compressing standard serializer.Does not allow you to set it to null. - Specified by:
- setElementSerializerin interface- AuxiliaryCache<K,- V> 
- Parameters:
- elementSerializer-
 
- 
getElementSerializerAllows it to be injected.- Returns:
- elementSerializer
 
- 
setKeyMatcherSets the key matcher used by get matching.- Specified by:
- setKeyMatcherin interface- ICache<K,- V> 
- Parameters:
- keyMatcher-
 
- 
getKeyMatcherReturns the key matcher used by get matching.- Returns:
- keyMatcher
 
 
-