|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.cdi.util.CacheLookupHelper
public final class CacheLookupHelper
An helper class providing useful methods for cache lookup.
Method Summary | |
---|---|
static javax.cache.annotation.CacheKeyGenerator |
getCacheKeyGenerator(javax.enterprise.inject.spi.BeanManager beanManager,
Class<? extends javax.cache.annotation.CacheKeyGenerator> methodCacheKeyGeneratorClass,
javax.cache.annotation.CacheDefaults cacheDefaultsAnnotation)
Resolves and creates an instance of CacheKeyGenerator . |
static String |
getCacheName(Method method,
String methodCacheName,
javax.cache.annotation.CacheDefaults cacheDefaultsAnnotation,
boolean generate)
Resolves the cache name of a method annotated with a JCACHE annotation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String getCacheName(Method method, String methodCacheName, javax.cache.annotation.CacheDefaults cacheDefaultsAnnotation, boolean generate)
method
- the annotated method.methodCacheName
- the cache name defined on the JCACHE annotation.cacheDefaultsAnnotation
- the CacheDefaults
annotation instance.generate
- true
if the default cache name has to be returned if none is specified.
NullPointerException
- if method or methodCacheName parameter is null
.public static javax.cache.annotation.CacheKeyGenerator getCacheKeyGenerator(javax.enterprise.inject.spi.BeanManager beanManager, Class<? extends javax.cache.annotation.CacheKeyGenerator> methodCacheKeyGeneratorClass, javax.cache.annotation.CacheDefaults cacheDefaultsAnnotation)
CacheKeyGenerator
. To resolve the cache key generator class the
algorithm defined in JCACHE specification is used.
beanManager
- the bean manager instance.methodCacheKeyGeneratorClass
- the CacheKeyGenerator
class declared in the cache annotation.cacheDefaultsAnnotation
- the CacheDefaults
annotation instance.
CacheKeyGenerator
instance.
NullPointerException
- if beanManager parameter is null
.
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |