Package org.jboss.cache.pojo

Examples of org.jboss.cache.pojo.PojoCache


   private DistributedCacheManagerFactoryImpl delegate = new DistributedCacheManagerFactoryImpl();

   public void configure(boolean local, String passivationDir, boolean totalReplication, boolean marshalling,
         boolean purgeCacheLoader)
   {
      PojoCache pc = createCache(local, passivationDir, totalReplication, marshalling, purgeCacheLoader);
      delegate.setPojoCache(pc);
   }
View Full Code Here


      return delegate.getDistributedCacheManager(localManager);
  

   public void cleanup(boolean doRemove)
   {
      PojoCache cache = delegate.getPojoCache();
      if (cache == null)
         return;
     
      if (doRemove && CacheStatus.STARTED.equals(cache.getCache().getCacheStatus()))
      {
         // Try to clean up so we avoid loading sessions
         // from storage in later tests
         try
         {
            log.info("Removing /JSESSION from " + cache.getCache().getLocalAddress());
            cache.getCache().removeNode(Fqn.fromString("/JSESSION"));
         }
         catch (Exception e)
         {
            log.error("Cache " + cache + ": " + e.getMessage(), e);
         }
      }
     
      try
      {
         cache.stop();
         cache.destroy();
      }
      catch (Exception e)
      {
         log.error("Cache " + cache + ": " + e.getMessage(), e);
      }
View Full Code Here

      return config;
   }

   public Object getLocalAddress()
   {
      PojoCache pc = delegate.getPojoCache();
      return pc == null ? null : pc.getCache().getLocalAddress();
   }
View Full Code Here

      return pc == null ? null : pc.getCache().getLocalAddress();
   }

   public List<Object> getMembers()
   {
      PojoCache pc = delegate.getPojoCache();
      return pc == null ? null : new ArrayList<Object>(pc.getCache().getMembers());
   }
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<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

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

    * @param config the Configuration for the cache
    * @return the PojoCache
    */
   protected PojoCache createPojoCache(Configuration config) throws Exception
   {
      PojoCache pc =  PojoCacheFactory.createCache(config, false);
      configureMuxUpHandlerChannel(pc.getCache());
      return pc;
   }
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.