Class SnitchProperties

java.lang.Object
org.apache.cassandra.locator.SnitchProperties

public class SnitchProperties extends Object
  • Field Details

    • RACKDC_PROPERTY_FILENAME

      public static final String RACKDC_PROPERTY_FILENAME
  • Constructor Details

    • SnitchProperties

      public SnitchProperties()
    • SnitchProperties

      public SnitchProperties(Properties properties)
    • SnitchProperties

      @SafeVarargs public SnitchProperties(Pair<String,String>... pairs)
  • Method Details

    • get

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

      public SnitchProperties add(String key, String value)
    • putIfAbsent

      public SnitchProperties putIfAbsent(String key, 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(String propertyName)
    • getDcSuffix

      public String getDcSuffix()
    • toString

      public String toString()
      Overrides:
      toString in class Object