Top Description Fields Constructors Methods
org.springframework.cache.jcache.interceptor

pack-priv abstract Class AbstractKeyCacheInterceptor<O extends AbstractJCacheKeyOperation<A>, A extends Annotation>

extends AbstractCacheInterceptor<O extends AbstractJCacheKeyOperation<A>, A extends Annotation>
Class Inheritance
Known Direct Subclasses
org.springframework.cache.jcache.interceptor.CachePutInterceptor, org.springframework.cache.jcache.interceptor.CacheRemoveEntryInterceptor, org.springframework.cache.jcache.interceptor.CacheResultInterceptor
Annotations
@SuppressWarnings:serial
Type Parameters
<O>
the operation type
<A>
the annotation type
Imports
java.lang.annotation.Annotation, javax.cache.annotation.CacheKeyInvocationContext, org.springframework.cache.interceptor.CacheErrorHandler, .CacheOperationInvocationContext, .KeyGenerator

A base interceptor for JSR-107 key-based cache annotations.
Author
Stephane Nicoll
Since
4.1

Field Summary

Inherited from org.springframework.cache.jcache.interceptor.AbstractCacheInterceptor:
logger

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected CacheKeyInvocationContext<A>

Returns:

the related CacheKeyInvocationContext
createCacheKeyInvocationContext
(CacheOperationInvocationContext<O>
the context of the invocation.
context
)

Create a CacheKeyInvocationContext based on the specified invocation.

protected Object

Returns:

the key to use
generateKey
(CacheOperationInvocationContext<O>
the context of the invocation
context
)

Generate a key for the specified invocation.

Inherited from org.springframework.cache.jcache.interceptor.AbstractCacheInterceptor:
extractFrominvokeresolveCache

Constructor Detail

AbstractKeyCacheInterceptorback to summary
protected AbstractKeyCacheInterceptor(CacheErrorHandler errorHandler)

Method Detail

createCacheKeyInvocationContextback to summary
protected CacheKeyInvocationContext<A> createCacheKeyInvocationContext(CacheOperationInvocationContext<O> context)

Create a CacheKeyInvocationContext based on the specified invocation.

Parameters
context:CacheOperationInvocationContext<O>

the context of the invocation.

Returns:CacheKeyInvocationContext<A>

the related CacheKeyInvocationContext

generateKeyback to summary
protected Object generateKey(CacheOperationInvocationContext<O> context)

Generate a key for the specified invocation.

Parameters
context:CacheOperationInvocationContext<O>

the context of the invocation

Returns:Object

the key to use