public abstract class AbstractAuxiliaryCache<K,V> extends Object implements AuxiliaryCache<K,V>
ICacheType.CacheType
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.
|
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.
|
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, wait
getAuxiliaryCacheAttributes, getKeySet, getStatistics
dispose, get, getCacheName, getMatching, getMultiple, getSize, getStats, getStatus, remove, removeAll, update
getCacheType
public AbstractAuxiliaryCache()
protected 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–2018 The Apache Software Foundation. All rights reserved.