Class Synonyms

java.lang.Object
io.nosqlbench.api.config.params.Synonyms

public class Synonyms extends Object
This class is just a central reference point for the names of parameters or other configuration-level primitives which have been given better names. For the sake of backwards compatibility, the old names are retained, but deprecated and warned against.
  • Field Details

    • PARAM_SYNONYMS

      public static final Map<String,Set<String>> PARAM_SYNONYMS
      Each entry in this list is a list of synonyms in configuration.
  • Constructor Details

    • Synonyms

      public Synonyms()
  • Method Details

    • canonicalize

      public static String canonicalize(String input, Map<String,Set<String>> synonyms, BiConsumer<String,String> warnings)
      use this method to convert deprecated
      Parameters:
      input - A configuration string from a user or file
      synonyms - A list of known synonym lists with the preferred values first, like PARAM_SYNONYMS
      warnings - An BiConsumer which can handle (deprecated, preferred) for subsitutions.
      Returns:
      The configuration string in canonicalized form, with the preferred names used where possible
    • canonicalize

      public static String canonicalize(String arg, org.apache.logging.log4j.Logger logger)