Examples of cacheName()


Examples of com.m4f.utils.cache.annotations.Cacheable.cacheName()

    String cacheName = "";
    Method method = null;
    try {
      method = this.getInterceptedMethod(pjp);
      Cacheable annotation = method.getAnnotation(Cacheable.class);
      cacheName = annotation != null ? annotation.cacheName() : "default";
    } catch(Exception e) {
      LOGGER.severe(StackTraceUtil.getStackTrace(e));
      cacheName = "default";
    } finally {
     
View Full Code Here

Examples of com.m4f.utils.cache.annotations.Cacheflush.cacheName()

    String cacheName = "";
    Method method = null;
    try {
      method = this.getInterceptedMethod(pjp);
      Cacheflush annotation = method.getAnnotation(Cacheflush.class);
      cacheName = annotation != null ? annotation.cacheName() : "default";
    } catch(Exception e) {
      LOGGER.severe(StackTraceUtil.getStackTrace(e));
      cacheName = "default";
    }
   
View Full Code Here

Examples of com.m4f.utils.cache.annotations.CatalogCacheable.cacheName()

    String cacheName = "";
    Method method = null;
    try {
      method = this.getInterceptedMethod(pjp);
      CatalogCacheable annotation = method.getAnnotation(CatalogCacheable.class);
      cacheName = annotation != null ? annotation.cacheName() : "default";
    } catch(Exception e) {
      LOGGER.severe(StackTraceUtil.getStackTrace(e));
      cacheName = "default";
    } finally {
     
View Full Code Here

Examples of javax.cache.annotation.CacheDefaults.cacheName()

  @Test
  public void defaultCacheNameWithDefaults() {
    Method method = ReflectionUtils.findMethod(Object.class, "toString");
    CacheDefaults mock = mock(CacheDefaults.class);
    given(mock.cacheName()).willReturn("");
    assertEquals("java.lang.Object.toString()", source.determineCacheName(method, mock, ""));
  }

  @Test
  public void defaultCacheNameNoDefaults() {
View Full Code Here

Examples of javax.cache.annotation.CachePut.cacheName()

            }

         } else if (method.isAnnotationPresent(CachePut.class)) {
            final CachePut cachePutAnnotation = method.getAnnotation(CachePut.class);
            cacheKeyGenerator = getCacheKeyGenerator(beanManager, cachePutAnnotation.cacheKeyGenerator(), cacheDefaultsAnnotation);
            cacheName = getCacheName(method, cachePutAnnotation.cacheName(), cacheDefaultsAnnotation, true);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, true);
            cacheAnnotation = cachePutAnnotation;

         } else {
            throw log.methodWithoutCacheAnnotation(method.getName());
View Full Code Here

Examples of javax.cache.annotation.CachePut.cacheName()

            }

         } else if (method.isAnnotationPresent(CachePut.class)) {
            final CachePut cachePutAnnotation = method.getAnnotation(CachePut.class);
            cacheKeyGenerator = getCacheKeyGenerator(beanManager, cachePutAnnotation.cacheKeyGenerator(), cacheDefaultsAnnotation);
            cacheName = getCacheName(method, cachePutAnnotation.cacheName(), cacheDefaultsAnnotation, true);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, true);
            cacheAnnotation = cachePutAnnotation;

         } else {
            throw log.methodWithoutCacheAnnotation(method.getName());
View Full Code Here

Examples of javax.cache.annotation.CachePut.cacheName()

            }

         } else if (method.isAnnotationPresent(CachePut.class)) {
            final CachePut cachePutAnnotation = method.getAnnotation(CachePut.class);
            cacheKeyGenerator = getCacheKeyGenerator(beanManager, cachePutAnnotation.cacheKeyGenerator(), cacheDefaultsAnnotation);
            cacheName = getCacheName(method, cachePutAnnotation.cacheName(), cacheDefaultsAnnotation, true);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, true);
            cacheAnnotation = cachePutAnnotation;

         } else {
            throw log.methodWithoutCacheAnnotation(method.getName());
View Full Code Here

Examples of javax.cache.annotation.CacheRemove.cacheName()

            cacheAnnotation = cacheResultAnnotation;

         } else if (method.isAnnotationPresent(CacheRemove.class)) {
            final CacheRemove cacheRemoveEntryAnnotation = method.getAnnotation(CacheRemove.class);
            cacheKeyGenerator = getCacheKeyGenerator(beanManager, cacheRemoveEntryAnnotation.cacheKeyGenerator(), cacheDefaultsAnnotation);
            cacheName = getCacheName(method, cacheRemoveEntryAnnotation.cacheName(), cacheDefaultsAnnotation, false);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, false);
            cacheAnnotation = cacheRemoveEntryAnnotation;

            if (cacheName.isEmpty()) {
               throw log.cacheRemoveEntryMethodWithoutCacheName(method.getName());
View Full Code Here

Examples of javax.cache.annotation.CacheRemoveAll.cacheName()

            }

         } else if (method.isAnnotationPresent(CacheRemoveAll.class)) {
            final CacheRemoveAll cacheRemoveAllAnnotation = method.getAnnotation(CacheRemoveAll.class);
            cacheKeyGenerator = null;
            cacheName = getCacheName(method, cacheRemoveAllAnnotation.cacheName(), cacheDefaultsAnnotation, false);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, false);
            cacheAnnotation = cacheRemoveAllAnnotation;

            if (cacheName.isEmpty()) {
               throw log.cacheRemoveAllMethodWithoutCacheName(method.getName());
View Full Code Here

Examples of javax.cache.annotation.CacheRemoveAll.cacheName()

            }

         } else if (method.isAnnotationPresent(CacheRemoveAll.class)) {
            final CacheRemoveAll cacheRemoveAllAnnotation = method.getAnnotation(CacheRemoveAll.class);
            cacheKeyGenerator = null;
            cacheName = getCacheName(method, cacheRemoveAllAnnotation.cacheName(), cacheDefaultsAnnotation, false);
            aggregatedParameterMetaData = getAggregatedParameterMetaData(method, false);
            cacheAnnotation = cacheRemoveAllAnnotation;

            if (cacheName.isEmpty()) {
               throw log.cacheRemoveAllMethodWithoutCacheName(method.getName());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.