Package org.jboss.cache.pojo

Examples of org.jboss.cache.pojo.PojoCache


         caches.add(cache);
      }
     
      for (String name : pojos)
      {
         PojoCache pojocache = registry.getPojoCache(name, false);
         assertNotNull(pojocache);
         Cache cache = pojocache.getCache();
         assertEquals(CacheStatus.STARTED, cache.getCacheStatus());
         caches.add(cache);
      }
     
      for (String name : cores)
View Full Code Here


      {
         for (int i = 0; i < pojoCaches.length; i++)
         {
            try
            {  
               PojoCache pc = pojoCaches[i];
               pojoCaches[i] = null;
               pc.stop();
               pc.destroy();
            }
            catch (Exception ex)
            {
               log.error("Failed stopping cache " + i);
            }
View Full Code Here

   public PojoCache getPojoCache(String configName, boolean create) throws Exception
   {
      // Check if there's an alias involved
      configName = resolveAlias(configName);
     
      PojoCache cache = null;
      synchronized (pojoCaches)
      {
         if (getCacheNames().contains(configName))
            throw new IllegalStateException("Cannot create PojoCache: plain cache already created for config " + configName);
        
View Full Code Here

         if (create && pojoCaches.containsKey(configName))
         {
            log.debug("Plain cache requested for config " + configName +
                      " but a PojoCache is already registered; returning " +
                      " the PojoCache's underlying plain cache");
            PojoCache pc = getPojoCache(configName, false);
            if (pc != null)
               return wrapCache(pc.getCache());
         }
        
         return wrapCache(super.getCache(configName, create));
      }
   }
View Full Code Here

      {
         if (pojoCaches.containsKey(configName))
         {
            if (decrementPojoCacheCheckout(configName) == 0)
            {
               PojoCache cache = pojoCaches.remove(configName);
               destroyPojoCache(configName, cache);
            }           
         }
         else
         {
View Full Code Here

      for (Map.Entry<String, Boolean> entry : startupCaches.entrySet())
      {
         Cache cache = null;
         if (entry.getValue().booleanValue())
         {
            PojoCache pc = getPojoCache(entry.getKey(), true);
            cache = pc.getCache();
         }
         else
         {
            cache = getCache(entry.getKey(), true);
         }
View Full Code Here

      }
     
      // Check if there's an alias involved
      configName = resolveAlias(configName);
     
      PojoCache cache = null;
      synchronized (pojoCaches)
      {
         if (getCacheNames().contains(configName))
            throw new IllegalStateException("Cannot create PojoCache: plain cache already created for config " + configName);
        
View Full Code Here

         if (create && pojoCaches.containsKey(configName))
         {
            log.debug("Plain cache requested for config " + configName +
                      " but a PojoCache is already registered; returning " +
                      " the PojoCache's underlying plain cache");
            PojoCache pc = getPojoCache(configName, false);
            if (pc != null)
            {
               return wrapCache(pc.getCache());
            }
         }
        
         return wrapCache(getPlainCache(configName, create));
      }
View Full Code Here

      {
         if (pojoCaches.containsKey(configName))
         {
            if (decrementPojoCacheCheckout(configName) == 0)
            {
               PojoCache cache = pojoCaches.remove(configName);
               destroyPojoCache(configName, cache);
            }           
         }
         else
         {
View Full Code Here

      for (Map.Entry<String, Boolean> entry : startupCaches.entrySet())
      {
         Cache<Object, Object> cache = null;
         if (entry.getValue().booleanValue())
         {
            PojoCache pc = getPojoCache(entry.getKey(), true);
            cache = pc.getCache();
         }
         else
         {
            cache = getCache(entry.getKey(), true);
         }
View Full Code Here

TOP

Related Classes of org.jboss.cache.pojo.PojoCache

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.