com.googlecode.ehcache.annotations
Annotation Type TriggersRemove


@Target(value=METHOD)
@Retention(value=RUNTIME)
@Inherited
@Documented
public @interface TriggersRemove

Annotation for methods who's calls trigger removal of data from a cache


Required Element Summary
 java.lang.String[] cacheName
          The name(s) of the cache to use.
 
Optional Element Summary
 KeyGenerator keyGenerator
          Used the specify and configure the CacheKeyGenerator to use for all caches.
 java.lang.String keyGeneratorName
          The Spring Bean name of the CacheKeyGenerator to use for all caches.
 boolean removeAll
          If a call should remove all elements from the cache.
 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.
 java.lang.String triggersRemoveInteceptorName
          The Spring Bean name of the TriggersRemoveInterceptor to use when intercepting invocations.
 When when
          Used to specify 'when' to run the ehcache remove call: before or after method invocation.
 

Element Detail

cacheName

public abstract java.lang.String[] cacheName
The name(s) of the cache to use. Note that the same CacheKeyGenerator is used for all caches.

removeAll

public abstract boolean removeAll
If a call should remove all elements from the cache. Will result in the specified keyGeneratorName being ignored.

Default:
false

keyGeneratorName

public abstract java.lang.String keyGeneratorName
The Spring Bean name of the CacheKeyGenerator to use for all caches. Ignored if keyGenerator() is specified. If this and keyGenerator() are not specified the default generator will be used. If removeAll() is true no CacheKeyGenerator is used.

Default:
""

keyGenerator

public abstract KeyGenerator keyGenerator
Used the specify and configure the CacheKeyGenerator to use for all caches. If this and keyGeneratorName() are not specified the default generator will be used. If removeAll() is true no CacheKeyGenerator is used.

Default:
@com.googlecode.ehcache.annotations.KeyGenerator(name="")

when

public abstract When when
Used to specify 'when' to run the ehcache remove call: before or after method invocation. If you specify When.AFTER_METHOD_INVOCATION and your method invocation throws an exception, the ehcache remove call WILL NOT execute. Default value is When.BEFORE_METHOD_INVOCATION.

Default:
com.googlecode.ehcache.annotations.When.BEFORE_METHOD_INVOCATION

triggersRemoveInteceptorName

public abstract java.lang.String triggersRemoveInteceptorName
The Spring Bean name of the TriggersRemoveInterceptor to use when intercepting invocations.

Default:
""

resolverFactoryName

public abstract java.lang.String resolverFactoryName
The Spring Bean name of the 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.

Default:
""

resolverFactory

public abstract ResolverFactory resolverFactory
Used the specify and configure the CacheResolverFactory to use. If this and resolverFactoryName() are not specified the specified cacheName() will be used.

Default:
@com.googlecode.ehcache.annotations.ResolverFactory(name="")


Copyright © 2011. All Rights Reserved.