All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.cache.annotation.CacheKeyInvocationContext Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
/**
 *  Copyright (c) 2011-2013 Terracotta, Inc.
 *  Copyright (c) 2011-2013 Oracle and/or its affiliates.
 *
 *  All rights reserved. Use is subject to license terms.
 */

package javax.cache.annotation;

import java.lang.annotation.Annotation;

/**
 * Runtime information about an intercepted method invocation for a method
 * annotated with {@link CacheResult}, {@link CachePut}, or
 * {@link CacheRemoveEntry}.
 * 

* Used with {@link CacheKeyGenerator#generateCacheKey(CacheKeyInvocationContext)} * to generate a {@link GeneratedCacheKey} for the invocation. * * @param The type of annotation this context information is for. One of * {@link javax.cache.annotation.CacheResult}, * {@link javax.cache.annotation.CachePut}, or * {@link javax.cache.annotation.CacheRemoveEntry} * @author Eric Dalquist * @see CacheKeyGenerator */ public interface CacheKeyInvocationContext extends CacheInvocationContext { /** * Returns a clone of the array of all method parameters to be used by the * {@link * CacheKeyGenerator} in creating a {@link GeneratedCacheKey}. The returned array * may be the same as or a subset of the array returned by * {@link #getAllParameters()} *

* Parameters in this array are selected by the following rules: *

* * @return An array of all parameters to be used in cache key generation */ CacheInvocationParameter[] getKeyParameters(); /** * When a method is annotated with {@link CachePut} this is the parameter * annotated with {@link CacheValue} * * @return The parameter to cache, will never be null for methods annotated with * {@link CachePut}, will be null for methods not annotated with {@link * CachePut} */ CacheInvocationParameter getValueParameter(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy