Class SnitchProperties


  • public class SnitchProperties
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      SnitchProperties add​(java.lang.String key, java.lang.String value)  
      boolean contains​(java.lang.String propertyName)  
      java.lang.String get​(java.lang.String propertyName, java.lang.String defaultValue)
      Get a snitch property value or return defaultValue if not defined.
      java.lang.String getDcSuffix()  
      SnitchProperties putIfAbsent​(java.lang.String key, java.lang.String value)
      Returns this instance of snitch properties if key is present otherwise create new instance of properties and put key with a give value into it
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • RACKDC_PROPERTY_FILENAME

        public static final java.lang.String RACKDC_PROPERTY_FILENAME
    • Constructor Detail

      • SnitchProperties

        public SnitchProperties()
      • SnitchProperties

        public SnitchProperties​(java.util.Properties properties)
      • SnitchProperties

        @SafeVarargs
        public SnitchProperties​(Pair<java.lang.String,​java.lang.String>... pairs)
    • Method Detail

      • get

        public java.lang.String get​(java.lang.String propertyName,
                                    java.lang.String defaultValue)
        Get a snitch property value or return defaultValue if not defined.
      • add

        public SnitchProperties add​(java.lang.String key,
                                    java.lang.String value)
      • putIfAbsent

        public SnitchProperties putIfAbsent​(java.lang.String key,
                                            java.lang.String value)
        Returns this instance of snitch properties if key is present otherwise create new instance of properties and put key with a give value into it
        Parameters:
        key - key to add
        value - value to add
        Returns:
        same properties if key is present or new object with added key and value if not
      • contains

        public boolean contains​(java.lang.String propertyName)
      • getDcSuffix

        public java.lang.String getDcSuffix()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object