Class ConfigData

java.lang.Object
io.nosqlbench.nb.api.config.standard.ConfigData

public class ConfigData extends Object
  • Constructor Details

  • Method Details

    • layer

      public ConfigData layer()
    • layer

      public ConfigData layer(Map<String,Object> configs)
    • get

      public <T> Optional<T> get(String name, Class<? extends T> type)
      Get the typed optional value for the requested parameter name.
      Type Parameters:
      T - The generic parameter of the class type
      Parameters:
      name - The name of the parameter to use
      type - The class type which the value must be assignable to.
      Returns:
      An optional of type T
      Throws:
      BasicError - if a value is found which can't be returned as the specified type.
    • getList

      public <T> Optional<List<T>> getList(String name, Class<? extends T> type)
      Get the typed optional list for the requested list name. This is no different than getting an object without the list qualifier, except that the type checking is done for you internal to the getList method.
      Type Parameters:
      T - The generic parameter of the list element type
      Parameters:
      name - The name of the parameter to return
      type - The type of the list element. Every element must be assignable to this type.
      Returns:
      An optional list of T
      Throws:
      BasicError - if any of the elements are not assignable to the required element type
    • put

      public void put(String paramName, List<String> paramValue)