Package net.sf.ehcache

Examples of net.sf.ehcache.CacheManager.shutdown()


        }
        finally
        {
            if ( cacheManager != null )
            {
                cacheManager.shutdown();
            }
        }
    }
}
View Full Code Here


        conf.setName("otherCache");
        CacheManager other = CacheManager.create(conf);
        assertEquals(Status.STATUS_ALIVE, other.getStatus());
       
        // shutdown this unrelated cache manager
        other.shutdown();
        assertEquals(Status.STATUS_SHUTDOWN, other.getStatus());
       
        // the default cache manager should be still running
        assertEquals(Status.STATUS_ALIVE, manager.getStatus());
       
View Full Code Here

      }
      System.out.println(cache1.getKeys());
      System.out.println(cache2.getKeys());

      c1.shutdown();
      c2.shutdown();
   }


   public void testInvalidation() throws Exception
   {
View Full Code Here

      assert cache2.get("key").getValue().equals("value");
      cache2.put(new Element("key","newValue"));
      assert cache1.get("key") == null;

      c1.shutdown();
      c2.shutdown();
   }
}
View Full Code Here

        }
        finally
        {
            if ( cacheManager != null )
            {
                cacheManager.shutdown();
            }
        }
    }
}
View Full Code Here

      
        assertEquals("myGlobalConfig", manager.getName());
        EHCacheManagerHolder.releaseCacheManger(manager);
        assertEquals(Status.STATUS_ALIVE, manager.getStatus());
      
        manager.shutdown();
        assertEquals(Status.STATUS_SHUTDOWN, manager.getStatus());
      
        bus.setProperty(EHCacheUtils.GLOBAL_EHCACHE_MANAGER_NAME, "myGlobalConfigXXX");
      
        manager = EHCacheUtils.getCacheManager(bus,
View Full Code Here

  private static void removeEhCache() {
    try {
      log.debug("Remove memory-only cache.");
      CacheManager singletonManager = CacheManager.create();
      singletonManager.removeCache(CACHE_NAME);
      singletonManager.shutdown();
    } catch(Exception e) {
      // ignore
    }
  }
}
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.