public class CacheOnlyCacheHandler extends AbstractRestCacheHandler
IOperationCacheHandler
does not execute the operation but always
reads from the cache.Constructor and Description |
---|
CacheOnlyCacheHandler() |
Modifier and Type | Method and Description |
---|---|
void |
beforeOperationExecution(IOperation operation)
Is invoked before the operation itself is started with
IOperation#internalExecute() . |
boolean |
skipOperationExecution(IOperation operation) |
afterOperationExecution, getCacheManager, onOperationFinished
setCacheManager
onOperationSuccessful
onOperationFailed
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onOperationFailed
public void beforeOperationExecution(IOperation operation)
IOperationCacheHandler
IOperation#internalExecute()
. Can be used to read some data from
the cache and set it into the operation.beforeOperationExecution
in interface IOperationCacheHandler
beforeOperationExecution
in class NoCacheHandler
public boolean skipOperationExecution(IOperation operation)
skipOperationExecution
in interface IOperationCacheHandler
skipOperationExecution
in class NoCacheHandler
IOperation
should be
skipped, e.g. if the result is offline and the operation will
fail anyway (with a costly timeout).