Examples of CacheInterceptor


Examples of dk.brics.jwig.server.cache.CacheInterceptor

    /**
     * Build the session factory from the data in the configuration. This method should be called
     * when all persistent classes are added to the configuration.
     */
    public static void buildSessionFactory() {
        configuration.setInterceptor(new CacheInterceptor());
        ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry();
        sessionFactory = configuration.buildSessionFactory(serviceRegistry);
    }
View Full Code Here

Examples of org.jboss.cache.aop.CacheInterceptor

      org.jboss.aop.advice.Interceptor[] interceptors = advisor.getInterceptors();
      // Step Check for cross references
      for (int i = 0; i < interceptors.length; i++) {
         Interceptor interceptor = interceptors[i];
         if (interceptor instanceof CacheInterceptor) {
            CacheInterceptor inter = (CacheInterceptor)interceptor;
            if (inter != null && inter.getFqn().equals(fqn))
            {
               return interceptor;
            }
         }
      }
View Full Code Here

Examples of org.jboss.resteasy.client.cache.CacheInterceptor

                        photoServer));

        ClientInterceptorRepositoryImpl interceptors = clientRequestFactory
                .getPrefixInterceptors();
        interceptors.registerInterceptor(new LoggingExecutionInterceptor());
        interceptors.registerInterceptor(new CacheInterceptor(
                new LightweightBrowserCache()));
        interceptors.registerInterceptor(new ForceCachingExecutionInterceptor(
                10));

        // create a proxy using the JAX-RS annotation
View Full Code Here

Examples of org.jboss.resteasy.client.cache.CacheInterceptor

                        photoServer));

        ClientInterceptorRepositoryImpl interceptors = clientRequestFactory
                .getPrefixInterceptors();
        interceptors.registerInterceptor(new LoggingExecutionInterceptor());
        interceptors.registerInterceptor(new CacheInterceptor(
                new LightweightBrowserCache()));
        interceptors.registerInterceptor(new ForceCachingExecutionInterceptor(
                10));

        // create a proxy using the JAX-RS annotation
View Full Code Here

Examples of org.springframework.cache.interceptor.CacheInterceptor

  }

  @Bean
  @Role(BeanDefinition.ROLE_INFRASTRUCTURE)
  public CacheInterceptor cacheInterceptor() {
    CacheInterceptor interceptor = new CacheInterceptor();
    interceptor.setCacheOperationSources(cacheOperationSource());
    if (this.cacheManager != null) {
      interceptor.setCacheManager(this.cacheManager);
    }
    if (this.keyGenerator != null) {
      interceptor.setKeyGenerator(this.keyGenerator);
    }
    return interceptor;
  }
View Full Code Here

Examples of org.springframework.cache.interceptor.CacheInterceptor

  }

  @Bean
  @Role(BeanDefinition.ROLE_INFRASTRUCTURE)
  public CacheInterceptor cacheInterceptor() {
    CacheInterceptor interceptor = new CacheInterceptor();
    interceptor.setCacheOperationSources(cacheOperationSource());
    if (this.cacheManager != null) {
      interceptor.setCacheManager(this.cacheManager);
    }
    if (this.keyGenerator != null) {
      interceptor.setKeyGenerator(this.keyGenerator);
    }
    return interceptor;
  }
View Full Code Here

Examples of org.springframework.cache.interceptor.CacheInterceptor

        "/org/springframework/cache/config/annotationDrivenCacheNamespace.xml");
  }

  @Test
  public void testKeyStrategy() {
    CacheInterceptor ci = ctx.getBean("org.springframework.cache.interceptor.CacheInterceptor#0",
        CacheInterceptor.class);
    assertSame(ctx.getBean("keyGenerator"), ci.getKeyGenerator());
  }
View Full Code Here

Examples of org.springframework.cache.interceptor.CacheInterceptor

  @Test
  public void cacheResolver() {
    ConfigurableApplicationContext context = new GenericXmlApplicationContext(
        "/org/springframework/cache/config/annotationDrivenCacheNamespace-resolver.xml");

    CacheInterceptor ci = context.getBean(CacheInterceptor.class);
    assertSame(context.getBean("cacheResolver"), ci.getCacheResolver());
    context.close();
  }
View Full Code Here

Examples of org.springframework.cache.interceptor.CacheInterceptor

  @Test
  public void bothSetOnlyResolverIsUsed() {
    ConfigurableApplicationContext context = new GenericXmlApplicationContext(
        "/org/springframework/cache/config/annotationDrivenCacheNamespace-manager-resolver.xml");

    CacheInterceptor ci = context.getBean(CacheInterceptor.class);
    assertSame(context.getBean("cacheResolver"), ci.getCacheResolver());
    context.close();
  }
View Full Code Here

Examples of org.springframework.cache.interceptor.CacheInterceptor

    context.close();
  }

  @Test
  public void testCacheErrorHandler() {
    CacheInterceptor ci = ctx.getBean("org.springframework.cache.interceptor.CacheInterceptor#0",
        CacheInterceptor.class);
    assertSame(ctx.getBean("errorHandler", CacheErrorHandler.class), ci.getErrorHandler());
  }
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.