Polishing

This commit is contained in:
Juergen Hoeller 2015-12-09 13:10:04 +01:00
parent 11806b9215
commit 76f84b914f
3 changed files with 29 additions and 24 deletions

View File

@ -26,8 +26,8 @@ import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
/**
* Annotation indicating that a method (or all methods on a class) triggers
* a cache eviction operation.
* Annotation indicating that a method (or all methods on a class) triggers a
* {@link org.springframework.cache.Cache#evict(Object) cache evict} operation.
*
* @author Costin Leau
* @author Stephane Nicoll
@ -60,8 +60,8 @@ public @interface CacheEvict {
/**
* Spring Expression Language (SpEL) expression for computing the key dynamically.
* <p>Default is {@code ""}, meaning all method parameters are considered as a key, unless
* a custom {@link #keyGenerator} has been set.
* <p>Default is {@code ""}, meaning all method parameters are considered as a key,
* unless a custom {@link #keyGenerator} has been set.
* <p>The SpEL expression evaluates again a dedicated context that provides the
* following meta-data:
* <ul>
@ -80,7 +80,8 @@ public @interface CacheEvict {
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.
* @see CacheConfig#keyGenerator
*/
@ -97,7 +98,8 @@ public @interface CacheEvict {
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
*/
String cacheResolver() default "";

View File

@ -23,16 +23,15 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.cache.Cache;
import org.springframework.core.annotation.AliasFor;
/**
* Annotation indicating that a method (or all methods on a class) triggers
* a {@linkplain Cache#put(Object, Object) cache put} operation.
* Annotation indicating that a method (or all methods on a class) triggers a
* {@link org.springframework.cache.Cache#put(Object, Object) cache put} operation.
*
* <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
* 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 Phillip Webb
@ -41,7 +40,7 @@ import org.springframework.core.annotation.AliasFor;
* @since 3.1
* @see CacheConfig
*/
@Target({ ElementType.METHOD, ElementType.TYPE })
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
@ -66,8 +65,8 @@ public @interface CachePut {
/**
* Spring Expression Language (SpEL) expression for computing the key dynamically.
* <p>Default is {@code ""}, meaning all method parameters are considered as a key, unless
* a custom {@link #keyGenerator} has been set.
* <p>Default is {@code ""}, meaning all method parameters are considered as a key,
* unless a custom {@link #keyGenerator} has been set.
* <p>The SpEL expression evaluates again a dedicated context that provides the
* following meta-data:
* <ul>
@ -85,7 +84,8 @@ public @interface CachePut {
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.
* @see CacheConfig#keyGenerator
*/
@ -102,7 +102,8 @@ public @interface CachePut {
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
*/
String cacheResolver() default "";

View File

@ -30,14 +30,14 @@ import org.springframework.core.annotation.AliasFor;
* in a class) can be cached.
*
* <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
* sensible default simply uses the method parameters to compute the key, but a SpEL
* expression can be provided via the {@link #key} attribute, or a custom
* {@link org.springframework.cache.interceptor.KeyGenerator KeyGenerator} implementation
* can replace the default one (see {@link #keyGenerator}).
* checking whether the method has been already invoked for the given arguments.
* A sensible default simply uses the method parameters to compute the key, but
* a SpEL expression can be provided via the {@link #key} attribute, or a custom
* {@link org.springframework.cache.interceptor.KeyGenerator} implementation can
* replace the default one (see {@link #keyGenerator}).
*
* <p>If no value is found in the cache for the computed key, the method is invoked
* and the returned value is used as the cache value.
* <p>If no value is found in the cache for the computed key, the target method
* will be invoked and the returned value stored in the associated cache.
*
* @author Costin Leau
* @author Phillip Webb
@ -89,7 +89,8 @@ public @interface Cacheable {
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.
* @see CacheConfig#keyGenerator
*/
@ -106,7 +107,8 @@ public @interface Cacheable {
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
*/
String cacheResolver() default "";