Package javax.cache.annotation

This package contains annotations for adding caching interceptors to java objects

See:
          Description

Interface Summary
CacheInvocationContext<A extends Annotation> Runtime information about an intercepted method invocation for a method annotated with CacheResult, CachePut, CacheRemoveEntry, or CacheRemoveAll

Used with CacheResolver.resolveCache(CacheInvocationContext) to determine the Cache to use at runtime for the method invocation.

CacheInvocationParameter A parameter to an intercepted method invocation.
CacheKey A Serializable, immutable, thread-safe object that is used as a cache key.
CacheKeyGenerator Generates a CacheKey based on a CacheKeyInvocationContext.
CacheKeyInvocationContext<A extends Annotation> Runtime information about an intercepted method invocation for a method annotated with CacheResult, CachePut, or CacheRemoveEntry.
CacheMethodDetails<A extends Annotation> Static information about a method annotated with one of: CacheResult, CachePut, CacheRemoveEntry, or CacheRemoveAll

Used with CacheResolverFactory.getCacheResolver(CacheMethodDetails) to determine the CacheResolver to use with the method.

CacheResolver Determines the Cache to use for an intercepted method invocation.
CacheResolverFactory Determines the CacheResolver to use for an annotated method.
 

Exception Summary
CacheAnnotationConfigurationException Thrown if an invalid cache annotation configuration is detected.
 

Annotation Types Summary
CacheDefaults Allows the configuration of defaults for CacheResult, CachePut, CacheRemoveEntry, and CacheRemoveAll at the class level.
CacheKeyParam Marks a method argument as part of the cache key.
CachePut When a method annotated with CachePut is invoked a CacheKey will be generated and Cache.put(Object, Object) will be invoked on the specified cache storing the value marked with CacheValue.
CacheRemoveAll When a method annotated with CacheRemoveAll is invoked all elements in the specified cache will be removed via the Cache.removeAll() method

The default behavior is to call Cache.removeAll() after the annotated method is invoked, this behavior can be changed by setting CacheRemoveAll.afterInvocation() to false in which case Cache.removeAll() will be called before the annotated method is invoked.

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.
CacheResult When a method annotated with CacheResult is invoked a CacheKey will be generated and Cache.get(Object) is called before the annotated method actually executes.
CacheValue Marks the parameter to be cached for a method annotated with CachePut.
 

Package javax.cache.annotation Description

This package contains annotations for adding caching interceptors to java objects

Since:
1.0
Author:
Eric Dalquist


Copyright © 2012. All Rights Reserved.