public abstract class AbstractAuxiliaryCache<K,V> extends Object implements AuxiliaryCache<K,V>
ICacheType.CacheTypeNAME_COMPONENT_DELIMITER| Constructor and Description |
|---|
AbstractAuxiliaryCache() |
| Modifier and Type | Method and Description |
|---|---|
protected ICacheEvent<K> |
createICacheEvent(ICacheElement<K,V> item,
String eventName)
Logs an event if an event logger is configured.
|
protected <T> ICacheEvent<T> |
createICacheEvent(String regionName,
T key,
String eventName)
Logs an event if an event logger is configured.
|
abstract ICacheElement<K,V> |
get(K key)
Gets the item from the cache.
|
ICacheEventLogger |
getCacheEventLogger()
Allows it to be injected.
|
IElementSerializer |
getElementSerializer()
Allows it to be injected.
|
abstract String |
getEventLoggingExtraInfo()
Gets the extra info for the event log.
|
IKeyMatcher<K> |
getKeyMatcher()
Returns the key matcher used by get matching.
|
protected void |
logApplicationEvent(String source,
String eventName,
String optionalDetails)
Logs an event if an event logger is configured.
|
protected void |
logError(String source,
String eventName,
String errorMessage)
Logs an event if an event logger is configured.
|
protected <T> void |
logICacheEvent(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.
|
void |
setCacheEventLogger(ICacheEventLogger cacheEventLogger)
Allows it to be injected.
|
void |
setElementSerializer(IElementSerializer elementSerializer)
Allows you to inject a custom serializer.
|
void |
setKeyMatcher(IKeyMatcher<K> keyMatcher)
Sets the key matcher used by get matching.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAuxiliaryCacheAttributes, getKeySet, getStatisticsdispose, getCacheName, getMatching, getMultiple, getSize, getStats, getStatus, remove, removeAll, updategetCacheTypeprotected Map<K,ICacheElement<K,V>> processGetMultiple(Set<K> keys) throws IOException
keys - IOExceptionpublic abstract ICacheElement<K,V> get(K key) throws IOException
get in interface ICache<K,V>key - IOExceptionprotected ICacheEvent<K> createICacheEvent(ICacheElement<K,V> item, String eventName)
item - eventName - protected <T> ICacheEvent<T> createICacheEvent(String regionName, T key, String eventName)
regionName - key - eventName - protected <T> void logICacheEvent(ICacheEvent<T> cacheEvent)
cacheEvent - protected void logApplicationEvent(String source, String eventName, String optionalDetails)
source - eventName - optionalDetails - protected void logError(String source, String eventName, String errorMessage)
source - eventName - errorMessage - public abstract String getEventLoggingExtraInfo()
public void setCacheEventLogger(ICacheEventLogger cacheEventLogger)
setCacheEventLogger in interface AuxiliaryCache<K,V>cacheEventLogger - public ICacheEventLogger getCacheEventLogger()
public void setElementSerializer(IElementSerializer elementSerializer)
Does not allow you to set it to null.
setElementSerializer in interface AuxiliaryCache<K,V>elementSerializer - public IElementSerializer getElementSerializer()
public void setKeyMatcher(IKeyMatcher<K> keyMatcher)
setKeyMatcher in interface ICache<K,V>keyMatcher - public IKeyMatcher<K> getKeyMatcher()
Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.