Polishing
This commit is contained in:
parent
11806b9215
commit
76f84b914f
|
|
@ -26,8 +26,8 @@ import java.lang.annotation.Target;
|
||||||
import org.springframework.core.annotation.AliasFor;
|
import org.springframework.core.annotation.AliasFor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotation indicating that a method (or all methods on a class) triggers
|
* Annotation indicating that a method (or all methods on a class) triggers a
|
||||||
* a cache eviction operation.
|
* {@link org.springframework.cache.Cache#evict(Object) cache evict} operation.
|
||||||
*
|
*
|
||||||
* @author Costin Leau
|
* @author Costin Leau
|
||||||
* @author Stephane Nicoll
|
* @author Stephane Nicoll
|
||||||
|
|
@ -60,8 +60,8 @@ public @interface CacheEvict {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Spring Expression Language (SpEL) expression for computing the key dynamically.
|
* Spring Expression Language (SpEL) expression for computing the key dynamically.
|
||||||
* <p>Default is {@code ""}, meaning all method parameters are considered as a key, unless
|
* <p>Default is {@code ""}, meaning all method parameters are considered as a key,
|
||||||
* a custom {@link #keyGenerator} has been set.
|
* unless a custom {@link #keyGenerator} has been set.
|
||||||
* <p>The SpEL expression evaluates again a dedicated context that provides the
|
* <p>The SpEL expression evaluates again a dedicated context that provides the
|
||||||
* following meta-data:
|
* following meta-data:
|
||||||
* <ul>
|
* <ul>
|
||||||
|
|
@ -80,7 +80,8 @@ public @interface CacheEvict {
|
||||||
String key() default "";
|
String key() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The bean name of the custom {@link org.springframework.cache.interceptor.KeyGenerator} to use.
|
* The bean name of the custom {@link org.springframework.cache.interceptor.KeyGenerator}
|
||||||
|
* to use.
|
||||||
* <p>Mutually exclusive with the {@link #key} attribute.
|
* <p>Mutually exclusive with the {@link #key} attribute.
|
||||||
* @see CacheConfig#keyGenerator
|
* @see CacheConfig#keyGenerator
|
||||||
*/
|
*/
|
||||||
|
|
@ -97,7 +98,8 @@ public @interface CacheEvict {
|
||||||
String cacheManager() default "";
|
String cacheManager() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver} to use.
|
* The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver}
|
||||||
|
* to use.
|
||||||
* @see CacheConfig#cacheResolver
|
* @see CacheConfig#cacheResolver
|
||||||
*/
|
*/
|
||||||
String cacheResolver() default "";
|
String cacheResolver() default "";
|
||||||
|
|
|
||||||
|
|
@ -23,16 +23,15 @@ import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
import org.springframework.cache.Cache;
|
|
||||||
import org.springframework.core.annotation.AliasFor;
|
import org.springframework.core.annotation.AliasFor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotation indicating that a method (or all methods on a class) triggers
|
* Annotation indicating that a method (or all methods on a class) triggers a
|
||||||
* a {@linkplain Cache#put(Object, Object) cache put} operation.
|
* {@link org.springframework.cache.Cache#put(Object, Object) cache put} operation.
|
||||||
*
|
*
|
||||||
* <p>In contrast to the {@link Cacheable @Cacheable} annotation, this annotation
|
* <p>In contrast to the {@link Cacheable @Cacheable} annotation, this annotation
|
||||||
* does not cause the advised method to be skipped. Rather, it always causes the
|
* does not cause the advised method to be skipped. Rather, it always causes the
|
||||||
* method to be invoked and its result to be stored in a cache.
|
* method to be invoked and its result to be stored in the associated cache.
|
||||||
*
|
*
|
||||||
* @author Costin Leau
|
* @author Costin Leau
|
||||||
* @author Phillip Webb
|
* @author Phillip Webb
|
||||||
|
|
@ -41,7 +40,7 @@ import org.springframework.core.annotation.AliasFor;
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
* @see CacheConfig
|
* @see CacheConfig
|
||||||
*/
|
*/
|
||||||
@Target({ ElementType.METHOD, ElementType.TYPE })
|
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Inherited
|
@Inherited
|
||||||
@Documented
|
@Documented
|
||||||
|
|
@ -66,8 +65,8 @@ public @interface CachePut {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Spring Expression Language (SpEL) expression for computing the key dynamically.
|
* Spring Expression Language (SpEL) expression for computing the key dynamically.
|
||||||
* <p>Default is {@code ""}, meaning all method parameters are considered as a key, unless
|
* <p>Default is {@code ""}, meaning all method parameters are considered as a key,
|
||||||
* a custom {@link #keyGenerator} has been set.
|
* unless a custom {@link #keyGenerator} has been set.
|
||||||
* <p>The SpEL expression evaluates again a dedicated context that provides the
|
* <p>The SpEL expression evaluates again a dedicated context that provides the
|
||||||
* following meta-data:
|
* following meta-data:
|
||||||
* <ul>
|
* <ul>
|
||||||
|
|
@ -85,7 +84,8 @@ public @interface CachePut {
|
||||||
String key() default "";
|
String key() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The bean name of the custom {@link org.springframework.cache.interceptor.KeyGenerator} to use.
|
* The bean name of the custom {@link org.springframework.cache.interceptor.KeyGenerator}
|
||||||
|
* to use.
|
||||||
* <p>Mutually exclusive with the {@link #key} attribute.
|
* <p>Mutually exclusive with the {@link #key} attribute.
|
||||||
* @see CacheConfig#keyGenerator
|
* @see CacheConfig#keyGenerator
|
||||||
*/
|
*/
|
||||||
|
|
@ -102,7 +102,8 @@ public @interface CachePut {
|
||||||
String cacheManager() default "";
|
String cacheManager() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver} to use.
|
* The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver}
|
||||||
|
* to use.
|
||||||
* @see CacheConfig#cacheResolver
|
* @see CacheConfig#cacheResolver
|
||||||
*/
|
*/
|
||||||
String cacheResolver() default "";
|
String cacheResolver() default "";
|
||||||
|
|
|
||||||
|
|
@ -30,14 +30,14 @@ import org.springframework.core.annotation.AliasFor;
|
||||||
* in a class) can be cached.
|
* in a class) can be cached.
|
||||||
*
|
*
|
||||||
* <p>Each time an advised method is invoked, caching behavior will be applied,
|
* <p>Each time an advised method is invoked, caching behavior will be applied,
|
||||||
* checking whether the method has been already invoked for the given arguments. A
|
* checking whether the method has been already invoked for the given arguments.
|
||||||
* sensible default simply uses the method parameters to compute the key, but a SpEL
|
* A sensible default simply uses the method parameters to compute the key, but
|
||||||
* expression can be provided via the {@link #key} attribute, or a custom
|
* a SpEL expression can be provided via the {@link #key} attribute, or a custom
|
||||||
* {@link org.springframework.cache.interceptor.KeyGenerator KeyGenerator} implementation
|
* {@link org.springframework.cache.interceptor.KeyGenerator} implementation can
|
||||||
* can replace the default one (see {@link #keyGenerator}).
|
* replace the default one (see {@link #keyGenerator}).
|
||||||
*
|
*
|
||||||
* <p>If no value is found in the cache for the computed key, the method is invoked
|
* <p>If no value is found in the cache for the computed key, the target method
|
||||||
* and the returned value is used as the cache value.
|
* will be invoked and the returned value stored in the associated cache.
|
||||||
*
|
*
|
||||||
* @author Costin Leau
|
* @author Costin Leau
|
||||||
* @author Phillip Webb
|
* @author Phillip Webb
|
||||||
|
|
@ -89,7 +89,8 @@ public @interface Cacheable {
|
||||||
String key() default "";
|
String key() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The bean name of the custom {@link org.springframework.cache.interceptor.KeyGenerator} to use.
|
* The bean name of the custom {@link org.springframework.cache.interceptor.KeyGenerator}
|
||||||
|
* to use.
|
||||||
* <p>Mutually exclusive with the {@link #key} attribute.
|
* <p>Mutually exclusive with the {@link #key} attribute.
|
||||||
* @see CacheConfig#keyGenerator
|
* @see CacheConfig#keyGenerator
|
||||||
*/
|
*/
|
||||||
|
|
@ -106,7 +107,8 @@ public @interface Cacheable {
|
||||||
String cacheManager() default "";
|
String cacheManager() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver} to use.
|
* The bean name of the custom {@link org.springframework.cache.interceptor.CacheResolver}
|
||||||
|
* to use.
|
||||||
* @see CacheConfig#cacheResolver
|
* @see CacheConfig#cacheResolver
|
||||||
*/
|
*/
|
||||||
String cacheResolver() default "";
|
String cacheResolver() default "";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue