Examples of EvictionRegionConfig


Examples of org.jboss.cache.config.EvictionRegionConfig

   }

   private static EvictionRegionConfig parseEvictionRegionConfig(Element element, String defaultEvPolicyClassName, int defaultQueueCapacity)
   {
      EvictionRegionConfig erc = new EvictionRegionConfig();

      erc.setRegionName(element.getAttribute(EvictionRegionConfig.NAME));

      String temp = element.getAttribute("eventQueueSize");
      if (temp != null && temp.length() > 0)
      {
         erc.setEventQueueSize(Integer.parseInt(temp));
      }
      else
      {
         erc.setEventQueueSize(defaultQueueCapacity);
      }
      String evictionClass = element.getAttribute("policyClass");

      if (evictionClass == null || evictionClass.length() == 0)
      {
         evictionClass = defaultEvPolicyClassName;
         // if it's still null... what do we setCache?
         if (evictionClass == null || evictionClass.length() == 0)
         {
            throw new MissingPolicyException(
                  "There is no Eviction Policy Class specified on the region or for the entire cache!");
         }
      }

      EvictionAlgorithmConfig algorithmConfig = getEvictionAlgorithmConfig(evictionClass);

      parseEvictionPolicyConfig(element, algorithmConfig);

      erc.setEvictionAlgorithmConfig(algorithmConfig);
      return erc;
   }
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.