javax.cache.interceptor
Annotation Type CachingDefaults


@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface CachingDefaults

Allows the configuration of cacheName, cacheResolver and cacheKeyResolver at the class level. The same settings at the method level will override this. This allows you to have defaults at the class level.

Since:
1.7
Author:
Rick Hightower

Optional Element Summary
 Class<? extends CacheKeyGenerator> cacheKeyGenerator
          (Optional) The CacheKeyGenerator to use to generate the cache key used to call Cache.get(Object) Cache.put(Object, Object)

Defaults to CacheKeyGenerator

 String cacheName
          (Optional) name of the cache.
 Class<? extends CacheResolver> cacheResolver
          (Optional) The CacheResolver to use to find the Cache the intercepter will interact with.
 

cacheName

public abstract String cacheName
(Optional) name of the cache.

Defaults to ClassName.methodName(argument type, argument type)

Default:
""

cacheResolver

public abstract Class<? extends CacheResolver> cacheResolver
(Optional) The CacheResolver to use to find the Cache the intercepter will interact with.

Defaults to resolving the cache by name from the default CacheManager

Default:
javax.cache.interceptor.CacheResolver.class

cacheKeyGenerator

public abstract Class<? extends CacheKeyGenerator> cacheKeyGenerator
(Optional) The CacheKeyGenerator to use to generate the cache key used to call Cache.get(Object) Cache.put(Object, Object)

Defaults to CacheKeyGenerator

Default:
javax.cache.interceptor.CacheKeyGenerator.class


Copyright © 2011. All Rights Reserved.