|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value=METHOD) @Retention(value=RUNTIME) @Inherited @Documented public @interface Cacheable
Annotation for methods whose return values should be cached.
| Required Element Summary | |
|---|---|
java.lang.String |
cacheName
The name of the cache to use |
| Optional Element Summary | |
|---|---|
java.lang.String |
cacheableInteceptorName
The Spring Bean name of the CacheableInterceptor to use when intercepting invocations. |
boolean |
cacheNull
If true null return values will be cached. |
DecoratedCacheType |
decoratedCacheType
The type of cache decoration to use. |
java.lang.String |
exceptionCacheName
The name of the cache to use for storing exceptions thrown by the advised method. |
KeyGenerator |
keyGenerator
Used the specify and configure the CacheKeyGenerator to use. |
java.lang.String |
keyGeneratorName
The Spring Bean name of the CacheKeyGenerator to use. |
long |
refreshInterval
Sets the time in ms between cache refreshes. |
ResolverFactory |
resolverFactory
Used the specify and configure the CacheResolverFactory to use. |
java.lang.String |
resolverFactoryName
The Spring Bean name of the CacheResolverFactory to use to resolve the correct cache at runtime. |
boolean |
selfPopulating
Deprecated. use decoratedCacheType(). Ignored if decoratedCacheType() is set to anything other than NONE |
int |
selfPopulatingTimeout
Sets the time in ms to wait to acquire a lock. |
| Element Detail |
|---|
public abstract java.lang.String cacheName
public abstract boolean cacheNull
decoratedCacheType() is set to DecoratedCacheType.SELF_POPULATING_CACHE or
DecoratedCacheType.REFRESHING_SELF_POPULATING_CACHE this setting is assumed to be true.
public abstract DecoratedCacheType decoratedCacheType
DecoratedCacheType.NONE.
@Deprecated public abstract boolean selfPopulating
decoratedCacheType(). Ignored if decoratedCacheType() is set to anything other than NONE
SelfPopulatingCache wrapper should be used to ensure only one
value per key is created.
public abstract int selfPopulatingTimeout
decoratedCacheType() is set to
DecoratedCacheType.SELF_POPULATING_CACHE or DecoratedCacheType.REFRESHING_SELF_POPULATING_CACHE.
Must be greater than or equal to 0. A value of 0 means wait forever, any positive value means wait for
that many milliseconds before throwing a LockTimeoutException
BlockingCache.setTimeoutMillis(int)public abstract long refreshInterval
decoratedCacheType() is set to
DecoratedCacheType.REFRESHING_SELF_POPULATING_CACHE. Defaults to 1 minute.
Must be greater than 0.
RefreshingSelfPopulatingCache#setRefreshInterval(long)public abstract java.lang.String keyGeneratorName
CacheKeyGenerator to use.
Ignored if keyGenerator() is specified.
If this and keyGenerator() are not specified the default generator will be used.
public abstract java.lang.String exceptionCacheName
public abstract KeyGenerator keyGenerator
CacheKeyGenerator to use.
If this and keyGeneratorName() are not specified the default generator will be used.
public abstract java.lang.String cacheableInteceptorName
CacheableInterceptor to use when intercepting invocations.
public abstract java.lang.String resolverFactoryName
CacheResolverFactory to use to resolve the correct cache at runtime.
Ignored if resolverFactory() is specified.
If this and resolverFactory() are not specified the specified cacheName() will be used.
public abstract ResolverFactory resolverFactory
CacheResolverFactory to use.
If this and resolverFactoryName() are not specified the specified cacheName() will be used.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||