public class CachingOperationInvoker extends Object implements OperationInvoker
OperationInvoker
that caches the response of an operation with a
configurable time to live.Modifier and Type | Method and Description |
---|---|
static OperationInvoker |
apply(OperationInvoker invoker,
long timeToLive)
Deprecated.
since 2.3.0 for removal in 2.5.0
|
long |
getTimeToLive()
Return the maximum time in milliseconds that a response can be cached.
|
Object |
invoke(InvocationContext context)
Invoke the underlying operation using the given
context . |
public long getTimeToLive()
public Object invoke(InvocationContext context)
OperationInvoker
context
.invoke
in interface OperationInvoker
context
- the context to use to invoke the operationnull
@Deprecated public static OperationInvoker apply(OperationInvoker invoker, long timeToLive)
invoker
- the invoker to wraptimeToLive
- the maximum time in milliseconds that a response can be cached