Package org.jboss.cache

Examples of org.jboss.cache.ConfigureException


     
      TestingUtil.blockUntilViewReceived(cache, 2, 10000);
   
      HashMap hm = new HashMap();
      hm.put("te", new TimeoutException("test", new RuntimeException()));
      ConfigureException ce = null;
      try
      {
         ce = new ConfigureException("test", new RuntimeException());
      }
      catch (Throwable t)
      {
         // Above signature not valid if cache is 123
         ce = new ConfigureException("123");
      }
      hm.put("ce", ce);
      cache.put("/TestTE", "TE", hm);
     
      stopCache("driver");
View Full Code Here


   public void parseXMLConfig(Element element) throws ConfigureException
   {
      String name = element.getAttribute(EvictionConfiguration.NAME);
      if (name == null || name.equals(""))
      {
         throw new ConfigureException("Name is required for the eviction region");
      }

      String maxNodes = XmlHelper.getAttr(element, EvictionConfiguration.MAX_NODES,
            EvictionConfiguration.ATTR, EvictionConfiguration.NAME);
      if (maxNodes != null && !maxNodes.equals(""))
      {
         setMaxNodes(Integer.parseInt(maxNodes));
      }
      else
      {
         setMaxNodes(0);
      }
      String timeToLive = XmlHelper.getAttr(element, EvictionConfiguration.TIME_TO_IDLE_SECONDS,
            EvictionConfiguration.ATTR, EvictionConfiguration.NAME);
      if (timeToLive == null)
      {
         timeToLive = XmlHelper.getAttr(element, EvictionConfiguration.TIME_TO_LIVE_SECONDS,
               EvictionConfiguration.ATTR, EvictionConfiguration.NAME);
         if (timeToLive == null)
            throw new ConfigureException("LRUConfiguration.parseXMLConfig(): Null timeToLiveSeconds element");
      }
      setTimeToLiveSeconds(Integer.parseInt(timeToLive));

      String maxAge = XmlHelper.getAttr(element, EvictionConfiguration.MAX_AGE_SECONDS,
            EvictionConfiguration.ATTR, EvictionConfiguration.NAME);
View Full Code Here

   public void parseXMLConfig(Element element) throws ConfigureException
   {
      String name = element.getAttribute(EvictionConfiguration.NAME);
      if (name == null || name.equals(""))
      {
         throw new ConfigureException("Name is required for the eviction region");
      }

      String maxNodes = XmlHelper.getAttr(element, EvictionConfiguration.MAX_NODES,
            EvictionConfiguration.ATTR, EvictionConfiguration.NAME);
      if (maxNodes != null && !maxNodes.equals(""))
      {
         setMaxNodes(Integer.parseInt(maxNodes));
      }
      else
      {
         setMaxNodes(0);
      }

      String maxElementsPerNode = XmlHelper.getAttr(element, EvictionConfiguration.MAX_ELEMENTS_PER_NODE,
            EvictionConfiguration.ATTR, EvictionConfiguration.NAME);
      if (maxElementsPerNode == null)
      {
         throw new ConfigureException("ElementSizeConfiguration.parseXMLConfig(): Null maxElementsPerNode element");
      }
      setMaxElementsPerNode(Integer.parseInt(maxElementsPerNode));

      if (log.isDebugEnabled())
      {
View Full Code Here

   {
      String name = element.getAttribute(NAME);

      if (name == null || name.equals(""))
      {
         throw new ConfigureException("Name is required for the eviction region");
      }

      String maxNodes = XmlHelper.getAttr(element,
            MAX_NODES, EvictionConfiguration.ATTR, EvictionConfiguration.NAME);
      if (maxNodes != null && !maxNodes.equals(""))
      {
         setMaxNodes(Integer.parseInt(maxNodes));

      }
      else
      {
         throw new ConfigureException("FIFOConfiguration requires maxNodes attribute");
      }

      if (log.isDebugEnabled())
      {
         log.debug("parseConfig: name -- " + name + " maxNodes -- "
View Full Code Here

   public void parseXMLConfig(Element element) throws ConfigureException
   {
      String name = element.getAttribute(EvictionConfiguration.NAME);
      if (name == null || name.equals(""))
      {
         throw new ConfigureException("Name is required for the eviction region");
      }

      String maxNodes = XmlHelper.getAttr(element,
            EvictionConfiguration.MAX_NODES, EvictionConfiguration.ATTR, EvictionConfiguration.NAME);
      if (maxNodes != null)
View Full Code Here

   public void parseXMLConfig(Element element) throws ConfigureException
   {
      String name = element.getAttribute(EvictionConfiguration.NAME);
      if (name == null || name.equals(""))
      {
         throw new ConfigureException("Name is required for the eviction region");
      }

      String maxNodes = XmlHelper.getAttr(element, EvictionConfiguration.MAX_NODES,
            EvictionConfiguration.ATTR, EvictionConfiguration.NAME);
      if (maxNodes != null && !maxNodes.equals(""))
      {
         setMaxNodes(Integer.parseInt(maxNodes));
      }
      else
      {
         throw new ConfigureException("Cannot have 0 for maxNodes on a MRUAlgorithm");
      }

      if (log.isDebugEnabled())
      {
         log.debug("parseConfig: name -- " + name + " maxNodes -- "
View Full Code Here

TOP

Related Classes of org.jboss.cache.ConfigureException

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.