Interface CacheMethodDetails<A extends Annotation>

    • Method Detail

      • getMethod

        Method getMethod()
        The annotated method
        Returns:
        The annotated method
      • getAnnotations

        Set<Annotation> getAnnotations()
        An immutable Set of all Annotations on this method
        Returns:
        An immutable Set of all Annotations on this method
      • getCacheName

        String getCacheName()
        The cache name resolved by the implementation.

        The cache name is determined by first looking at the cacheName attribute of the method level annotation. If that attribute is not set then the class level CacheDefaults annotation is checked. If that annotation does not exist or does not have its cacheName attribute set then the following cache name generation rules are followed:

        "fully qualified class name"."method name"("fully qualified parameter class names")

        For example:

        
         package my.app;
         
         public class DomainDao {
           @CacheResult
           public Domain getDomain(String domainId, int index) {
             ...
           }
         }
         

        Results in the cache name: "my.app.DomainDao.getDomain(java.lang.String,int)"

        Returns:
        The fully resolved cache name