com.googlecode.ehcache.annotations
Interface CacheAttributeSource

All Known Implementing Classes:
CacheAttributeSourceImpl

public interface CacheAttributeSource

This interface provides operations to determine if methods/classes have CacheableAttribute or TriggersRemoveAttribute information.

Version:
$Revision: 656 $
Author:
Eric Dalquist

Method Summary
 AdviceType getAdviceType(java.lang.reflect.Method method, java.lang.Class<?> targetClass)
          Determines if the method has should be cached or involved with cache entry removal.
 CacheableAttribute getCacheableAttribute(java.lang.reflect.Method method, java.lang.Class<?> targetClass)
          Gets the runtime caching information for a method.
 TriggersRemoveAttribute getTriggersRemoveAttribute(java.lang.reflect.Method method, java.lang.Class<?> targetClass)
          Gets the runtime triggers-remove information for a method.
 

Method Detail

getAdviceType

AdviceType getAdviceType(java.lang.reflect.Method method,
                         java.lang.Class<?> targetClass)
Determines if the method has should be cached or involved with cache entry removal. Returns AdviceType.NONE if the method doesn't participate with either.

Parameters:
method - The method to inspect
targetClass - The class the method exists on
Returns:
The type of advice on the method, AdviceType.NONE if the method is not advised. Will never return null.

getTriggersRemoveAttribute

TriggersRemoveAttribute getTriggersRemoveAttribute(java.lang.reflect.Method method,
                                                   java.lang.Class<?> targetClass)
Gets the runtime triggers-remove information for a method. If the method is not eligible for triggers-remove null is returned.

Parameters:
method - The method to inspect
targetClass - The class the method exists on
Returns:
Runtime triggers-remove configuration for the method, null if the method is not involved with triggers-remove.

getCacheableAttribute

CacheableAttribute getCacheableAttribute(java.lang.reflect.Method method,
                                         java.lang.Class<?> targetClass)
Gets the runtime caching information for a method. If the method is not eligible for caching null is returned.

Parameters:
method - The method to inspect
targetClass - The class the method exists on
Returns:
Runtime caching configuration for the method, null if the method is not cachable.


Copyright © 2011. All Rights Reserved.