Package org.infinispan.interceptors

Examples of org.infinispan.interceptors.InterceptorChain.addInterceptorAfter()


      UnpreparedDuringRehashTask ut = new UnpreparedDuringRehashTask(firstNode, txsStarted, txsReady, joinEnded, rehashStarted);
      PrepareDuringRehashTask pt = new PrepareDuringRehashTask(firstNode, txsStarted, txsReady, joinEnded, rehashStarted);
      CommitDuringRehashTask ct = new CommitDuringRehashTask(firstNode, txsStarted, txsReady, joinEnded, rehashStarted);

      InterceptorChain ic = TestingUtil.extractComponent(firstNode, InterceptorChain.class);
      ic.addInterceptorAfter(pt, TxInterceptor.class);
      ic.addInterceptorAfter(ct, TxInterceptor.class);


      Set<Thread> threads = new HashSet<Thread>();
      threads.add(new Thread(ut, "Worker-UnpreparedDuringRehashTask"));
View Full Code Here


      PrepareDuringRehashTask pt = new PrepareDuringRehashTask(firstNode, txsStarted, txsReady, joinEnded, rehashStarted);
      CommitDuringRehashTask ct = new CommitDuringRehashTask(firstNode, txsStarted, txsReady, joinEnded, rehashStarted);

      InterceptorChain ic = TestingUtil.extractComponent(firstNode, InterceptorChain.class);
      ic.addInterceptorAfter(pt, TxInterceptor.class);
      ic.addInterceptorAfter(ct, TxInterceptor.class);


      Set<Thread> threads = new HashSet<Thread>();
      threads.add(new Thread(ut, "Worker-UnpreparedDuringRehashTask"));
      threads.add(new Thread(pt, "Worker-PrepareDuringRehashTask"));
View Full Code Here

      BlockCommandInterceptor interceptor;
      if (chain.containsInterceptorType(BlockCommandInterceptor.class)) {
         interceptor = (BlockCommandInterceptor) chain.getInterceptorsWithClass(BlockCommandInterceptor.class).get(0);
      } else {
         interceptor = new BlockCommandInterceptor();
         chain.addInterceptorAfter(interceptor, EntryWrappingInterceptor.class);
      }
      interceptor.reset();
      return interceptor;
   }
View Full Code Here

      BlockCommandInterceptor interceptor;
      if (chain.containsInterceptorType(BlockCommandInterceptor.class)) {
         interceptor = (BlockCommandInterceptor) chain.getInterceptorsWithClass(BlockCommandInterceptor.class).get(0);
      } else {
         interceptor = new BlockCommandInterceptor(log);
         if (!chain.addInterceptorAfter(interceptor, EntryWrappingInterceptor.class)) {
            if (!chain.addInterceptorAfter(interceptor, VersionedEntryWrappingInterceptor.class)) {
               AssertJUnit.assertTrue(chain.addInterceptorAfter(interceptor, TotalOrderVersionedEntryWrappingInterceptor.class));
            }
         }
      }
View Full Code Here

      if (chain.containsInterceptorType(BlockCommandInterceptor.class)) {
         interceptor = (BlockCommandInterceptor) chain.getInterceptorsWithClass(BlockCommandInterceptor.class).get(0);
      } else {
         interceptor = new BlockCommandInterceptor(log);
         if (!chain.addInterceptorAfter(interceptor, EntryWrappingInterceptor.class)) {
            if (!chain.addInterceptorAfter(interceptor, VersionedEntryWrappingInterceptor.class)) {
               AssertJUnit.assertTrue(chain.addInterceptorAfter(interceptor, TotalOrderVersionedEntryWrappingInterceptor.class));
            }
         }
      }
      interceptor.reset();
View Full Code Here

         interceptor = (BlockCommandInterceptor) chain.getInterceptorsWithClass(BlockCommandInterceptor.class).get(0);
      } else {
         interceptor = new BlockCommandInterceptor(log);
         if (!chain.addInterceptorAfter(interceptor, EntryWrappingInterceptor.class)) {
            if (!chain.addInterceptorAfter(interceptor, VersionedEntryWrappingInterceptor.class)) {
               AssertJUnit.assertTrue(chain.addInterceptorAfter(interceptor, TotalOrderVersionedEntryWrappingInterceptor.class));
            }
         }
      }
      interceptor.reset();
      log.debugf("Injected BlockCommandInterceptor in %s. Interceptor=%s", cache, interceptor);
View Full Code Here

      UnpreparedDuringRehashTask ut = new UnpreparedDuringRehashTask(firstNode, txsStarted, txsReady, joinEnded, rehashStarted);
      PrepareDuringRehashTask pt = new PrepareDuringRehashTask(firstNode, txsStarted, txsReady, joinEnded, rehashStarted);
      CommitDuringRehashTask ct = new CommitDuringRehashTask(firstNode, txsStarted, txsReady, joinEnded, rehashStarted);

      InterceptorChain ic = TestingUtil.extractComponent(firstNode, InterceptorChain.class);
      ic.addInterceptorAfter(pt, TxInterceptor.class);
      ic.addInterceptorAfter(ct, TxInterceptor.class);


      Set<Thread> threads = new HashSet<Thread>();
      threads.add(new Thread(ut, "Worker-UnpreparedDuringRehashTask"));
View Full Code Here

      PrepareDuringRehashTask pt = new PrepareDuringRehashTask(firstNode, txsStarted, txsReady, joinEnded, rehashStarted);
      CommitDuringRehashTask ct = new CommitDuringRehashTask(firstNode, txsStarted, txsReady, joinEnded, rehashStarted);

      InterceptorChain ic = TestingUtil.extractComponent(firstNode, InterceptorChain.class);
      ic.addInterceptorAfter(pt, TxInterceptor.class);
      ic.addInterceptorAfter(ct, TxInterceptor.class);


      Set<Thread> threads = new HashSet<Thread>();
      threads.add(new Thread(ut, "Worker-UnpreparedDuringRehashTask"));
      threads.add(new Thread(pt, "Worker-PrepareDuringRehashTask"));
View Full Code Here

      cache1 = cache(0, "replSync");
      cache(1, "replSync");
      InterceptorChain chain = TestingUtil.extractComponent(cache1, InterceptorChain.class);
      chain.removeInterceptor(MarshalledValueListenerInterceptor.class);
      mvli = new MarshalledValueListenerInterceptor();
      chain.addInterceptorAfter(mvli, MarshalledValueInterceptor.class);
   }

   @Override
   @AfterClass
   protected void destroy() {
View Full Code Here

         ConfigurationBuilder builder = new ConfigurationBuilder().read(cfg);
         InterceptorConfigurationBuilder interceptorBuilder = builder.customInterceptors().addInterceptor();
         interceptorBuilder.interceptor(wrapperInterceptor);

         if (cfg.invocationBatching().enabled()) {
            if (ic != null) ic.addInterceptorAfter(wrapperInterceptor, BatchingInterceptor.class);
            interceptorBuilder.after(BatchingInterceptor.class);
         } else {
            if (ic != null) ic.addInterceptorAfter(wrapperInterceptor, InvocationContextInterceptor.class);
            interceptorBuilder.after(InvocationContextInterceptor.class);
         }
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.