A
- The type of annotation this context information is for. One of
CacheResult
, CachePut
, CacheRemove
, or CacheRemoveAll
.CacheMethodDetails<A>
CacheKeyInvocationContext<A>
public interface CacheInvocationContext<A extends Annotation> extends CacheMethodDetails<A>
CacheResult
, CachePut
, CacheRemove
,
or CacheRemoveAll
Used with CacheResolver.resolveCache(CacheInvocationContext)
to
determine the Cache
to use at runtime for the method
invocation.
CacheResolver
Modifier and Type | Method | Description |
---|---|---|
CacheInvocationParameter[] |
getAllParameters() |
Returns a clone of the array of all method parameters.
|
Object |
getTarget() |
|
<T> T |
unwrap(Class<T> cls) |
Return an object of the specified type to allow access to the
provider-specific API.
|
getAnnotations, getCacheAnnotation, getCacheName, getMethod
Object getTarget()
CacheInvocationParameter[] getAllParameters()
<T> T unwrap(Class<T> cls)
IllegalArgumentException
is thrown.T
- The type of the expected underlying Cache
implementation.cls
- the class of the object to be returned. This is normally either the
underlying implementation class or an interface that it implements.IllegalArgumentException
- if the provider doesn't support the specified
class.Copyright © 2017. All rights reserved.