Package org.jboss.cache

Examples of org.jboss.cache.Cache.stop()


         cache.get(Fqn.ROOT, "x");
         assert 0 == i.get();
      }
      finally
      {
         cache.stop();
      }
   }

   @CacheListener
   public static class Listener
View Full Code Here


         }
      }
     
      try
      {
         cache.stop();
         cache.destroy();
      }
      catch (Exception e)
      {
         log.error("Cache " + cache + ": " + e.getMessage(), e);
View Full Code Here

{
   public void testConstruction()
   {
      Cache c = new UnitTestCacheFactory<Object, Object>().createCache(UnitTestCacheConfigurationFactory.createConfiguration(Configuration.CacheMode.REPL_SYNC));
      c.put("/a", "b", "c");
      c.stop();
      c.destroy();
   }

//   ComponentRegistry cr;
//   Configuration cfg;
View Full Code Here

      regManager.registerAllMBeans();
      String name = regManager.getObjectName(CacheMgmtInterceptor.class.getSimpleName());
      assert mBeanServer.isRegistered(new ObjectName(name));
      regManager.unregisterAllMBeans();
      assert !mBeanServer.isRegistered(new ObjectName(name));
      cache.stop();
   }

   public void testRegisterReplicatedCache() throws Exception
   {
      Configuration localConfig = UnitTestCacheConfigurationFactory.createConfiguration(Configuration.CacheMode.REPL_SYNC);
View Full Code Here

      regManager.registerAllMBeans();
      String name = regManager.getObjectName(CacheMgmtInterceptor.class.getSimpleName());
      assert mBeanServer.isRegistered(new ObjectName(name));
      regManager.unregisterAllMBeans();
      assert !mBeanServer.isRegistered(new ObjectName(name));
      cache.stop();
   }

   /**
    * This is useful when wanting to startup jconsole...
    */
 
View Full Code Here

        factories.clear();
       
        for (Iterator it = caches.iterator(); it.hasNext(); ) {
            try {
                Cache cache = (Cache) it.next();
                cache.stop();
                cache.destroy();
            }
            catch (Exception e) {
                storeException(e);
            }
View Full Code Here

  }

  private void destroy() {

    Cache cache = createCacheUseDefault();
    cache.stop();
    cache.destroy();
  }
 
  private void getNode() {
    Cache cache = createCacheUseDefault();
View Full Code Here

   {
      if (caches.size() > 2 && caches.get(2) != null)
      {
         Cache cache = caches.get(2);
         caches.remove(2);
         cache.stop();
         cache.destroy();
      }
      super.tearDown();
   }
View Full Code Here

      regManager.registerAllMBeans();
      String name = regManager.getObjectName(CacheMgmtInterceptor.class.getSimpleName());
      assert mBeanServer.isRegistered(new ObjectName(name));
      regManager.unregisterAllMBeans();
      assert !mBeanServer.isRegistered(new ObjectName(name));
      cache.stop();
   }
  
   protected void registerLocalCache() throws Exception
   {
      Configuration localConfig = UnitTestConfigurationFactory.createConfiguration(Configuration.CacheMode.LOCAL);
View Full Code Here

      regManager.registerAllMBeans();
      String name = regManager.getObjectName(CacheMgmtInterceptor.class.getSimpleName());
      assert mBeanServer.isRegistered(new ObjectName(name));
      regManager.unregisterAllMBeans();
      assert !mBeanServer.isRegistered(new ObjectName(name));
      cache.stop();
   }

   /**
    * This is useful when wanting to startup jconsole...
    */
 
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.