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

pack-priv Class CacheResultOperation

extends AbstractJCacheKeyOperation<CacheResult>
Class Inheritance
Imports
javax.cache.annotation.CacheMethodDetails, .CacheResult, org.springframework.cache.interceptor.CacheResolver, .KeyGenerator, org.springframework.lang.Nullable, org.springframework.util.ExceptionTypeFilter, .StringUtils

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

Field Summary

Modifier and TypeField and Description
private final String
private final CacheResolver
private final ExceptionTypeFilter

Constructor Summary

AccessConstructor and Description
public
CacheResultOperation(CacheMethodDetails<CacheResult> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator, CacheResolver exceptionCacheResolver)

Method Summary

Modifier and TypeMethod and Description
public String
getExceptionCacheName()

Return the name of the cache to cache exceptions, or null if caching exceptions should be disabled.

public CacheResolver
getExceptionCacheResolver()

Return the CacheResolver instance to use to resolve the cache to use for matching exceptions thrown by this operation.

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 boolean
isAlwaysInvoked()

Specify if the method should always be invoked regardless of a cache hit.

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

Field Detail

exceptionCacheNameback to summary
private final String exceptionCacheName
Annotations
@Nullable
exceptionCacheResolverback to summary
private final CacheResolver exceptionCacheResolver
Annotations
@Nullable
exceptionTypeFilterback to summary
private final ExceptionTypeFilter exceptionTypeFilter

Constructor Detail

CacheResultOperationback to summary
public CacheResultOperation(CacheMethodDetails<CacheResult> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator, CacheResolver exceptionCacheResolver)

Method Detail

getExceptionCacheNameback to summary
public String getExceptionCacheName()

Return the name of the cache to cache exceptions, or null if caching exceptions should be disabled.

Annotations
@Nullable
See Also
javax.cache.annotation.CacheResult#exceptionCacheName()
getExceptionCacheResolverback to summary
public CacheResolver getExceptionCacheResolver()

Return the CacheResolver instance to use to resolve the cache to use for matching exceptions thrown by this operation.

Annotations
@Nullable
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
isAlwaysInvokedback to summary
public boolean isAlwaysInvoked()

Specify if the method should always be invoked regardless of a cache hit. By default, the method is only invoked in case of a cache miss.

See Also
javax.cache.annotation.CacheResult#skipGet()