@ComponentProfile(summary="Retrieve a value from the configured cache",
since="3.9.2",
tag="service,cache",
recommended=CacheConnection.class)
public class GetValueFromCache
extends SingleKeyValueCacheImpl
RetrieveFromCacheService that doesn't use CacheEntryEvaluator.
Most of the time, you only want to retrieve a single item to the cache rather than a list of
items; this simplified service allows you to do just that. It does not have a list of entries
that are evaluated, you simply specify a key and a CacheValueTranslator which is used to
insert the value from the cache into the current message.
In the adapter configuration file this class is aliased as get-single-value-from-cache which is the preferred alternative to the fully qualified classname when building your configuration.
log| Constructor and Description |
|---|
GetValueFromCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
java.lang.Boolean |
getExceptionIfNotFound() |
void |
setExceptionIfNotFound(java.lang.Boolean b)
Whether or not to throw an exception if the key is not in the cache.
|
GetValueFromCache |
withExceptionIfNotFound(java.lang.Boolean b) |
getValueTranslator, prepare, setValueTranslator, withValueTranslatorgetKey, setKey, withKeycloseService, getConnection, initService, retrieveCache, setConnection, start, stop, withConnectionchangeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontinueOnFailure, isBranching, setUniqueIdcreateName, createQualifier, isTrackingEndpointchangeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentStategetUniqueIdclose, initpublic void doService(AdaptrisMessage msg) throws ServiceException
ServiceApply the service to the message.
msg - the AdaptrisMessage to processServiceException - wrapping any underlying Exceptionspublic java.lang.Boolean getExceptionIfNotFound()
public void setExceptionIfNotFound(java.lang.Boolean b)
b - default is truepublic GetValueFromCache withExceptionIfNotFound(java.lang.Boolean b)