Examples of Cacheable


Examples of br.com.caelum.vraptor.restfulie.resource.Cacheable

  }

  public void handle(HypermediaResource resource) {
    // TODO implement link headers
    if(Cacheable.class.isAssignableFrom(resource.getClass())) {
      Cacheable cache = (Cacheable) resource;
      response.addHeader("Cache-control","max-age=" + cache.getMaximumAge());
    }
    if(RestfulEntity.class.isInstance(resource)) {
      RestfulEntity entity = (RestfulEntity) resource;
      restfulHeadersFor(entity.getEtag(), entity.getLastModified());
    } else {
View Full Code Here

Examples of com.m4f.utils.cache.annotations.Cacheable

    // Getting the cacheName linked with this method
    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 javax.persistence.Cacheable

    Cache cacheAnn = clazzToProcess.getAnnotation( Cache.class );
    if ( cacheAnn != null ) {
      return cacheAnn;
    }

    Cacheable cacheableAnn = clazzToProcess.getAnnotation( Cacheable.class );
    SharedCacheMode mode = determineSharedCacheMode( mappings );
    switch ( mode ) {
      case ALL: {
        cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        break;
      }
      case ENABLE_SELECTIVE: {
        if ( cacheableAnn != null && cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      case DISABLE_SELECTIVE: {
        if ( cacheableAnn == null || cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      default: {
View Full Code Here

Examples of javax.persistence.Cacheable

    Cache cacheAnn = clazzToProcess.getAnnotation( Cache.class );
    if ( cacheAnn != null ) {
      return cacheAnn;
    }

    Cacheable cacheableAnn = clazzToProcess.getAnnotation( Cacheable.class );
    SharedCacheMode mode = determineSharedCacheMode( mappings );
    switch ( mode ) {
      case ALL: {
        cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        break;
      }
      case ENABLE_SELECTIVE: {
        if ( cacheableAnn != null && cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      case DISABLE_SELECTIVE: {
        if ( cacheableAnn == null || cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      default: {
View Full Code Here

Examples of javax.persistence.Cacheable

    Cache cacheAnn = clazzToProcess.getAnnotation( Cache.class );
    if ( cacheAnn != null ) {
      return cacheAnn;
    }

    Cacheable cacheableAnn = clazzToProcess.getAnnotation( Cacheable.class );
    SharedCacheMode mode = determineSharedCacheMode( mappings );
    switch ( mode ) {
      case ALL: {
        cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        break;
      }
      case ENABLE_SELECTIVE: {
        if ( cacheableAnn != null && cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      case DISABLE_SELECTIVE: {
        if ( cacheableAnn == null || cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      default: {
View Full Code Here

Examples of javax.persistence.Cacheable

    Cache cacheAnn = clazzToProcess.getAnnotation( Cache.class );
    if ( cacheAnn != null ) {
      return cacheAnn;
    }

    Cacheable cacheableAnn = clazzToProcess.getAnnotation( Cacheable.class );
    SharedCacheMode mode = determineSharedCacheMode( mappings );
    switch ( mode ) {
      case ALL: {
        cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        break;
      }
      case ENABLE_SELECTIVE: {
        if ( cacheableAnn != null && cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      case DISABLE_SELECTIVE: {
        if ( cacheableAnn == null || cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      default: {
View Full Code Here

Examples of javax.persistence.Cacheable

    Cache cacheAnn = clazzToProcess.getAnnotation( Cache.class );
    if ( cacheAnn != null ) {
      return cacheAnn;
    }

    Cacheable cacheableAnn = clazzToProcess.getAnnotation( Cacheable.class );
    SharedCacheMode mode = determineSharedCacheMode( mappings );
    switch ( mode ) {
      case ALL: {
        cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        break;
      }
      case ENABLE_SELECTIVE: {
        if ( cacheableAnn != null && cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      case DISABLE_SELECTIVE: {
        if ( cacheableAnn == null || cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      default: {
View Full Code Here

Examples of javax.persistence.Cacheable

    Cache cacheAnn = clazzToProcess.getAnnotation( Cache.class );
    if ( cacheAnn != null ) {
      return cacheAnn;
    }

    Cacheable cacheableAnn = clazzToProcess.getAnnotation( Cacheable.class );
    SharedCacheMode mode = determineSharedCacheMode( mappings );
    switch ( mode ) {
      case ALL: {
        cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        break;
      }
      case ENABLE_SELECTIVE: {
        if ( cacheableAnn != null && cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      case DISABLE_SELECTIVE: {
        if ( cacheableAnn == null || cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      default: {
View Full Code Here

Examples of javax.persistence.Cacheable

    Cache cacheAnn = clazzToProcess.getAnnotation( Cache.class );
    if ( cacheAnn != null ) {
      return cacheAnn;
    }

    Cacheable cacheableAnn = clazzToProcess.getAnnotation( Cacheable.class );
    SharedCacheMode mode = determineSharedCacheMode( mappings );
    switch ( mode ) {
      case ALL: {
        cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        break;
      }
      case ENABLE_SELECTIVE: {
        if ( cacheableAnn != null && cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      case DISABLE_SELECTIVE: {
        if ( cacheableAnn == null || cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      default: {
View Full Code Here

Examples of javax.persistence.Cacheable

    Cache cacheAnn = clazzToProcess.getAnnotation( Cache.class );
    if ( cacheAnn != null ) {
      return cacheAnn;
    }

    Cacheable cacheableAnn = clazzToProcess.getAnnotation( Cacheable.class );
    SharedCacheMode mode = determineSharedCacheMode( mappings );
    switch ( mode ) {
      case ALL: {
        cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        break;
      }
      case ENABLE_SELECTIVE: {
        if ( cacheableAnn != null && cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      case DISABLE_SELECTIVE: {
        if ( cacheableAnn == null || cacheableAnn.value() ) {
          cacheAnn = buildCacheMock( clazzToProcess.getName(), mappings );
        }
        break;
      }
      default: {
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.