@ComponentProfile(summary="Add a single key/value to the configured cache cache", since="3.9.2", tag="service,cache", recommended=CacheConnection.class) public class AddValueToCache extends SingleKeyValueCacheImpl
AddToCacheService
that doesn't use CacheEntryEvaluators
.
Most of the time, you only want to add 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 extract
the value for storing in the cache; no checking is done of the resulting serializable-ness (or
not) of the value, it is simply inserted into the cache.
In the adapter configuration file this class is aliased as add-single-value-to-cache which is the preferred alternative to the fully qualified classname when building your configuration.
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
AddValueToCache() |
Modifier and Type | Method and Description |
---|---|
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
getValueTranslator, prepare, setValueTranslator, withValueTranslator
getKey, setKey, withKey
closeService, getConnection, initService, retrieveCache, setConnection, start, stop, withConnection
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getLookupName, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setLookupName, setUniqueId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
continueOnFailure, isBranching, setUniqueId
createName, createQualifier, isTrackingEndpoint
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
getUniqueId
close, init
getLookupName
public void doService(AdaptrisMessage msg) throws ServiceException
Service
Apply the service to the message.
msg
- the AdaptrisMessage
to processServiceException
- wrapping any underlying Exception
s