Package org.infinispan.manager

Examples of org.infinispan.manager.EmbeddedCacheManager.stop()


   @Override
   public void contextDestroyed(ServletContextEvent sce) {
      EmbeddedCacheManager cm = getCacheManager(sce.getServletContext());
      if (cm != null) {
         cm.stop();
      }
   }

   private Class<?> loadClass(String name) throws Exception {
      return Thread.currentThread().getContextClassLoader().loadClass(name);
View Full Code Here


      writeInitialData(cache1);

      WritingThread writerThread = new WritingThread(cache1, tx);
      writerThread.start();

      manager3.stop();

      // Pause for view to update
      TestingUtil.blockUntilViewsReceived(60000, false, cache1);

      cache3 = createCacheManager().getCache(cacheName);
View Full Code Here

      EmbeddedCacheManager cacheManager = TestCacheManagerFactory.createLocalCacheManager(false);
      try {
         Cache<Object, Object> cache = cacheManager.getCache();
         DistributedExecutorService des = new DefaultExecutorService(cache);
      } finally {
         cacheManager.stop();
      }
   }
  
   /**
    * Tests that we can invoke DistributedExecutorService on an Infinispan cluster having a single node
View Full Code Here

         assert list.size() == 1;
         for (Future<Integer> f : list) {
            assert f.get() == 1;
         }
      } finally {
         cacheManager.stop();
      }
   }
  
   /**
    * Tests that we can invoke DistributedExecutorService task with keys
View Full Code Here

         Future<Boolean> future = des.submit(new SimpleDistributedCallable(true), new String[] {
                  "key1", "key2" });
         Boolean r = future.get();
         assert r;
      } finally {
         cacheManager.stop();
      }
   }


   static class SimpleDistributedCallable implements DistributedCallable<String, String, Boolean>,
View Full Code Here

                int index = random.nextInt(size);
                EmbeddedCacheManager cacheManager = cacheManagers.remove(index); //This is not thread safe, but should be ok for this test since the main thread is the only writrer to this list.


            log.info("Shutting down " + cacheManager.getAddress());
                cacheManager.stop();
            log.info("Shut down " + cacheManager.getAddress() + " complete");
            } catch (Exception e) {
            log.warn("Error during node removal", e);
            }
        }
View Full Code Here

      cacheManager.start();
      Cache<String, String> cache = cacheManager.getCache("testCache");

      cache.put("hello", "there");
      cache.stop();
      cacheManager.stop();
   }

   @Test(enabled = false, description = "ISPN-3388")
   public void testLegacyJavaConfig() {
      GlobalConfiguration globalConfig = new GlobalConfigurationBuilder().globalJmxStatistics().transport().defaultTransport().build();
View Full Code Here

      cacheManager.start();
      Cache<String, String> cache = cacheManager.getCache("testCache");

      cache.put("hello", "there legacy java");
      cache.stop();
      cacheManager.stop();
   }

   @Test(enabled = false, description = "ISPN-3388")
   public void textXmlConfigLegacy() throws IOException {
      EmbeddedCacheManager cacheManager = new DefaultCacheManager("config/leveldb-config-legacy-" +
View Full Code Here

            LevelDBStoreConfiguration.ImplementationType.AUTO.toString().toLowerCase() + ".xml");
      Cache<String, String> cache = cacheManager.getCache("testCache");

      cache.put("hello", "there legacy xml");
      cache.stop();
      cacheManager.stop();

      TestingUtil.recursiveFileRemove("/tmp/leveldb/legacy");
   }

   public void testXmlConfig60() throws IOException {
View Full Code Here

      Cache<String, String> cache = cacheManager.getCache("testCache");

      cache.put("hello", "there 60 xml");
      cache.stop();
      cacheManager.stop();

      TestingUtil.recursiveFileRemove("/tmp/leveldb/60");
   }

}
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.