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


      EmbeddedCacheManager cacheManager = TestCacheManagerFactory.createCacheManager(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

*/
@Test(groups = "functional", testName = "commons.NotifyingFutureTest")
public class NotifyingFutureTest {

   public void testDoneThisThread() throws ExecutionException, InterruptedException {
      testDone(new WithinThreadExecutor(), 0, 0);
   }
View Full Code Here

   public void testDoneThisThread() throws ExecutionException, InterruptedException {
      testDone(new WithinThreadExecutor(), 0, 0);
   }

   public void testExceptionThisThread() throws ExecutionException, InterruptedException {
      testException(new WithinThreadExecutor(), 0, 0);
   }
View Full Code Here

         cl.write(marshalledEntry(new FixedHashKey(i + 10, "exp k" + i), "value", im)); // will expire
      }
      timeService.advance(1001);
      assertContains(k1, true);
      assertContains(k2, false);
      cl.purge(new WithinThreadExecutor(), null);
      assertContains(k1, true);
      assertContains(k2, false);
      UnitTestDatabaseManager.verifyConnectionLeaks(((JdbcBinaryStore) cl).getConnectionFactory());
   }
View Full Code Here

      cacheStore.write(marshalledEntry(first, marshaller));
      cacheStore.write(marshalledEntry(second, marshaller));
      assertRowCount(2);
      Thread.sleep(1100);
//      printTableContent();
      cacheStore.purge(new WithinThreadExecutor(), null);
      assertRowCount(1);
      assertEquals("val2", cacheStore.load(MANIK).getValue());
   }
View Full Code Here

      cl.write(TestingUtil.marshalledEntry(k3, getMarshaller()));
      assert cl.contains("k1");
      assert cl.contains("k2");
      assert cl.contains("k3");
      Thread.sleep(lifespan + 100);
      cl.purge(new WithinThreadExecutor(), null);
      LevelDBStore fcs = (LevelDBStore) cl;
      assert fcs.load("k1") == null;
      assert fcs.load("k2") == null;
      assert fcs.load("k3") == null;
   }
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.