Package org.infinispan.util.concurrent

Examples of org.infinispan.util.concurrent.WithinThreadExecutor


      cl.process(filter, new AdvancedCacheLoader.CacheLoaderTask() {
         @Override
         public void processEntry(MarshalledEntry marshalledEntry, AdvancedCacheLoader.TaskContext taskContext) throws InterruptedException {
            result.add(marshalledEntry);
         }
      }, new WithinThreadExecutor(), true, true);
      return result;
   }
View Full Code Here


   }

   public void start() throws CacheLoaderException {
      if (config == null) throw new IllegalStateException("Make sure you call super.init() from CacheStore extension");
      if (config.isPurgeSynchronously()) {
         purgerService = new WithinThreadExecutor();
      } else {
         purgerService = Executors.newSingleThreadExecutor();
      }
      transactions = new ConcurrentHashMap<GlobalTransaction, List<? extends Modification>>(64, 0.75f, getConcurrencyLevel());
   }
View Full Code Here

      EmbeddedCacheManager cacheManager = TestCacheManagerFactory.createLocalCacheManager(false);
      DistributedExecutorService des = null;
      try {
         Cache<Object, Object> cache = cacheManager.getCache();

         ExecutorService service = new WithinThreadExecutor();
         service.shutdown();

         des = new DefaultExecutorService(cache, service);
      } finally {
         TestingUtil.killCacheManagers(cacheManager);
      }
View Full Code Here

      EmbeddedCacheManager cacheManager = TestCacheManagerFactory.createClusteredCacheManager(config);
      DistributedExecutorService des = null;
      try {
         Cache<Object, Object> cache = cacheManager.getCache();

         ExecutorService service = new WithinThreadExecutor();
         des = new DefaultExecutorService(cache, service);

         Future<Integer> future = des.submit(new SimpleCallable());
         Integer r = future.get();
         assert r == 1;
View Full Code Here

      EmbeddedCacheManager cacheManager = TestCacheManagerFactory.createClusteredCacheManager(config);
      DistributedExecutorService des = null;
      ExecutorService service = null;
      try {
         Cache<Object, Object> cache = cacheManager.getCache();
         service = new WithinThreadExecutor();

         des = new DefaultExecutorService(cache, service);

         des.shutdown();
View Full Code Here

      EmbeddedCacheManager cacheManager = TestCacheManagerFactory.createClusteredCacheManager(config);
      DistributedExecutorService des = null;
      ExecutorService service = null;
      try {
         Cache<Object, Object> cache = cacheManager.getCache();
         service = new WithinThreadExecutor();

         des = new DefaultExecutorService(cache, service, true);

         des.shutdown();
View Full Code Here

   public void setEnvironment(Cache<K, V> cache, Set<K> inputKeys) {
      cacheManager = cache.getCacheManager();
      cacheNotifier = cache.getAdvancedCache().getComponentRegistry().getComponent(CacheNotifier.class);
      cacheManagerNotifier = cache.getCacheManager().getGlobalComponentRegistry().getComponent(
            CacheManagerNotifier.class);
      distExecutor = new DefaultExecutorService(cache, new WithinThreadExecutor());
      ourAddress = cache.getCacheManager().getAddress();
   }
View Full Code Here

               return;
            }
            Metadata metadata = me.getMetadata() != null ? ((InternalMetadataImpl)me.getMetadata()).actual() : null; //the downcast will go away with ISPN-3460
            preloadKey(flaggedCache, me.getKey(), me.getValue(), metadata);
         }
      }, new WithinThreadExecutor(), true, true);

      log.debugf("Preloaded %s keys in %s", loadedEntries, Util.prettyPrintTime(timeService.timeDuration(start, MILLISECONDS)));
   }
View Full Code Here

                              log.failedLoadingValueFromCacheStore(me.getKey(), e);
                           }
                        }
                     }
                  };
               stProvider.process(filter, task, new WithinThreadExecutor(), true, true);
            } catch (CacheException e) {
               log.failedLoadingKeysFromCacheStore(e);
            }
         }
View Full Code Here

      this.asyncProcessor = executor;
   }

   @Start (priority = 9)
   public void start() {
      syncProcessor = new WithinThreadExecutor();
   }
View Full Code Here

TOP

Related Classes of org.infinispan.util.concurrent.WithinThreadExecutor

Copyright © 2018 www.massapicom. 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.