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

pack-priv Class CachePutOperation

extends AbstractJCacheKeyOperation<CachePut>
Class Inheritance
Imports
java.lang.reflect.Method, java.util.List, javax.cache.annotation.CacheInvocationParameter, .CacheMethodDetails, .CachePut, org.springframework.cache.interceptor.CacheResolver, .KeyGenerator, org.springframework.lang.Nullable, org.springframework.util.ExceptionTypeFilter

The JCacheOperation implementation for a CachePut operation.
Author
Stephane Nicoll
Since
4.1
See Also
CachePut

Field Summary

Modifier and TypeField and Description
private final ExceptionTypeFilter
private final AbstractJCacheOperation.CacheParameterDetail

Constructor Summary

AccessConstructor and Description
public
CachePutOperation(CacheMethodDetails<CachePut> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator)

Method Summary

Modifier and TypeMethod and Description
public ExceptionTypeFilter
getExceptionTypeFilter()

Implements abstract org.springframework.cache.jcache.interceptor.AbstractJCacheOperation.getExceptionTypeFilter.

Return the ExceptionTypeFilter to use to filter exceptions thrown while invoking the method.

public CacheInvocationParameter

Returns:

the CacheInvocationParameter instance for the value parameter
getValueParameter
(Object...
the parameters value for a particular invocation
values
)

Return the CacheInvocationParameter for the parameter holding the value to cache.

private static AbstractJCacheOperation.CacheParameterDetail
public boolean
isEarlyPut()

Specify if the cache should be updated before invoking the method.

Inherited from org.springframework.cache.jcache.interceptor.AbstractJCacheKeyOperation:
getKeyGeneratorgetKeyParameters

Field Detail

exceptionTypeFilterback to summary
private final ExceptionTypeFilter exceptionTypeFilter
valueParameterDetailback to summary
private final AbstractJCacheOperation.CacheParameterDetail valueParameterDetail

Constructor Detail

CachePutOperationback to summary
public CachePutOperation(CacheMethodDetails<CachePut> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator)

Method Detail

getExceptionTypeFilterback to summary
public ExceptionTypeFilter getExceptionTypeFilter()

Implements abstract org.springframework.cache.jcache.interceptor.AbstractJCacheOperation.getExceptionTypeFilter.

Doc from org.springframework.cache.jcache.interceptor.AbstractJCacheOperation.getExceptionTypeFilter.

Return the ExceptionTypeFilter to use to filter exceptions thrown while invoking the method.

Annotations
@Override
getValueParameterback to summary
public CacheInvocationParameter getValueParameter(Object... values)

Return the CacheInvocationParameter for the parameter holding the value to cache.

The method arguments must match the signature of the related method invocation

Parameters
values:Object[]

the parameters value for a particular invocation

Returns:CacheInvocationParameter

the CacheInvocationParameter instance for the value parameter

initializeValueParameterDetailback to summary
private static AbstractJCacheOperation.CacheParameterDetail initializeValueParameterDetail(Method method, List<AbstractJCacheOperation.CacheParameterDetail> allParameters)
Annotations
@Nullable
isEarlyPutback to summary
public boolean isEarlyPut()

Specify if the cache should be updated before invoking the method. By default, the cache is updated after the method invocation.

See Also
javax.cache.annotation.CachePut#afterInvocation()