javax.cache.interceptor
Annotation Type CacheRemoveEntry


@Target(value={METHOD,TYPE})
@Retention(value=RUNTIME)
@InterceptorBinding
public @interface CacheRemoveEntry

When a method annotated with CacheRemoveEntry is invoked a CacheKey will be generated and Cache.remove(Object) will be invoked on the specified cache.

Since:
1.7
Author:
Eric Dalquist, Rick Hightower

Optional Element Summary
 boolean afterInvocation
          (Optional) When Cache.remove(Object) should be called.
 Class<? extends CacheKeyGenerator> cacheKeyGenerator
          (Optional) The CacheKeyGenerator to use to generate the cache key used to call Cache.remove(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

Default:
""

afterInvocation

public abstract boolean afterInvocation
(Optional) When Cache.remove(Object) should be called. If true it is called after the annotated method invocation completes successfully. If false it is called before the annotated method is invoked.

Defaults to true.

Default:
true

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.remove(Object)

Defaults to CacheKeyGenerator

Default:
javax.cache.interceptor.CacheKeyGenerator.class


Copyright © 2011. All Rights Reserved.