@ComponentProfile(summary="Check the cache for a key", tag="service,cache", branchSelector=true, since="3.5.1", recommended=CacheConnection.class) public class CheckCacheService extends CacheServiceBase
Service
implementation that checks if specific key(s) exist in the cache.In the adapter configuration file this class is aliased as check-cache which is the preferred alternative to the fully qualified classname when building your configuration.
Modifier and Type | Class and Description |
---|---|
protected static interface |
CheckCacheService.FoundInCache |
log
Constructor and Description |
---|
CheckCacheService() |
Modifier and Type | Method and Description |
---|---|
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
protected boolean |
eval(AdaptrisMessage msg) |
protected boolean |
eval(AdaptrisMessage msg,
CheckCacheService.FoundInCache callback) |
java.lang.String |
getKeysFoundServiceId() |
java.lang.String |
getKeysNotFoundServiceId() |
boolean |
isBranching()
Returns true if the implementation supports branching.
|
void |
setKeysFoundServiceId(java.lang.String id)
Set the service id that will be fired if the keys are found.
|
void |
setKeysNotFoundServiceId(java.lang.String id)
Set the service id that will be fired if the keys are not found.
|
addCacheEntryEvaluator, addCacheValueToMessage, getCacheEntryEvaluators, setCacheEntryEvaluators
closeService, getConnection, initService, prepare, retrieveCache, setConnection, start, stop, withConnection
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
continueOnFailure, setUniqueId
createName, createQualifier, isTrackingEndpoint
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
getUniqueId
close, init
public void doService(AdaptrisMessage msg) throws ServiceException
Service
Apply the service to the message.
msg
- the AdaptrisMessage
to processServiceException
- wrapping any underlying Exception
sprotected boolean eval(AdaptrisMessage msg) throws CoreException
CoreException
protected boolean eval(AdaptrisMessage msg, CheckCacheService.FoundInCache callback) throws CoreException
CoreException
public java.lang.String getKeysNotFoundServiceId()
public void setKeysNotFoundServiceId(java.lang.String id)
id
- the defaultServiceId to setpublic java.lang.String getKeysFoundServiceId()
public void setKeysFoundServiceId(java.lang.String id)
id
- the keysFoundServiceId to setpublic boolean isBranching()
Service
Returns true if the implementation supports branching.
isBranching
in interface Service
isBranching
in class ServiceImp
BranchingServiceCollection