@ComponentProfile(summary="Clear the contents of the configured cache", since="3.10.2", tag="service,cache", recommended=CacheConnection.class) public class ClearCacheService extends CacheServiceImpl
You may wish to invalidate the contents of the cache from time to time outside of the standard
expiry conditions. You can use this service to clear the contents of the cache. Since
Cache.clear()
defaults to throwing an UnsupportedOperationException
you can opt
for this service to silently ignore that exception if the underlying cache doesn't support it.
In the adapter configuration file this class is aliased as clear-cache-service which is the preferred alternative to the fully qualified classname when building your configuration.
log
Constructor and Description |
---|
ClearCacheService() |
Modifier and Type | Method and Description |
---|---|
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
java.lang.Boolean |
getIgnoreUnsupported() |
void |
setIgnoreUnsupported(java.lang.Boolean b)
Whether or not to silently eat a possible
UnsupportedOperationException that could be
thrown by Cache.clear() . |
ClearCacheService |
withIgnoreUnsupported(java.lang.Boolean s) |
closeService, getConnection, initService, prepare, retrieveCache, setConnection, start, stop, withConnection
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, 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
public void doService(AdaptrisMessage msg) throws ServiceException
Service
Apply the service to the message.
msg
- the AdaptrisMessage
to processServiceException
- wrapping any underlying Exception
spublic java.lang.Boolean getIgnoreUnsupported()
public void setIgnoreUnsupported(java.lang.Boolean b)
UnsupportedOperationException
that could be
thrown by Cache.clear()
.b
- true to ignore UnsupportedOperationException
, default is false if not
specified.public ClearCacheService withIgnoreUnsupported(java.lang.Boolean s)