Package org.infinispan.util

Examples of org.infinispan.util.TypedProperties


   private final TypedProperties props;


   public ConfigurationProperties() {
      this.props = new TypedProperties();
   }
View Full Code Here


      this();
      props.setProperty(SERVER_LIST, serverList);
   }

   public ConfigurationProperties(Properties props) {
      this.props = props == null ? new TypedProperties() : TypedProperties.toTypedProperties(props);
   }
View Full Code Here

      testImmutability("properties");
      // JBCACHE-531: escape all backslash characters
      // replace any "\" that is not preceded by a backslash with "\\"
      properties = XmlConfigHelper.escapeBackslashes(properties);
      ByteArrayInputStream is = new ByteArrayInputStream(properties.trim().getBytes("ISO8859_1"));
      this.properties = new TypedProperties();
      this.properties.load(is);
      is.close();
   }
View Full Code Here

      }

      @Override
      public IndexingConfig addProperty(String key, String value) {
         if (properties == null) {
            properties = new TypedProperties();
         }
         this.properties.setProperty(key, value);
         return this;
      }
View Full Code Here

      }

      @Override
      public DataContainerConfig addProperty(String key, String value) {
         if (this.properties == null) {
            this.properties= new TypedProperties();
         }
         this.properties.setProperty(key, value);
         return this;
      }
View Full Code Here

            throw new ConfigurationException("Couldn't find a setter named [" + setter + "] which takes a single parameter, for parameter " + propName + " on class [" + objectClass + "]");
      }
   }

   public static Properties extractProperties(Element source) {
      TypedProperties p = new TypedProperties();
      NodeList list = source.getElementsByTagName("property");
      if (list == null) return null;
      // loop through attributes
      for (int loop = 0; loop < list.getLength(); loop++) {
         Node node = list.item(loop);
         if (node.getNodeType() != Node.ELEMENT_NODE) continue;

         // for each element (attribute) ...
         Element element = (Element) node;
         String name = element.getAttribute("name");
         String valueStr = element.getAttribute("value");

         if (valueStr.length() > 0) {
            valueStr = valueStr.trim();
            valueStr = StringPropertyReplacer.replaceProperties(valueStr);
            p.put(name, valueStr);
         }
      }
      return p.isEmpty() ? null : p;
   }
View Full Code Here

      }

      @Override
      public DataContainerConfig addProperty(String key, String value) {
         if (this.properties == null) {
            this.properties= new TypedProperties();
         }
         this.properties.setProperty(key, value);
         return this;
      }
View Full Code Here

      }

      @Override
      public IndexingConfig addProperty(String key, String value) {
         if (properties == null) {
            properties = new TypedProperties();
         }
         this.properties.setProperty(key, value);
         return this;
      }
View Full Code Here

                                    new LinkedBlockingQueue<Runnable>(queueSize),
                                    tf);
   }

   private void readParams(Properties props) {
      TypedProperties tp = TypedProperties.toTypedProperties(props);
      poolSize = tp.getIntProperty(ConfigurationProperties.DEFAULT_EXECUTOR_FACTORY_POOL_SIZE, 10);
      queueSize = tp.getIntProperty(ConfigurationProperties.DEFAULT_EXECUTOR_FACTORY_QUEUE_SIZE, 100000);
   }
View Full Code Here

   private final TypedProperties props;


   public ConfigurationProperties() {
      this.props = new TypedProperties();
   }
View Full Code Here

TOP

Related Classes of org.infinispan.util.TypedProperties

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.