Class BindingsTemplate

java.lang.Object
io.nosqlbench.virtdata.core.bindings.BindingsTemplate

public class BindingsTemplate extends Object
Maps a set of parameters on an associated object of type T to specifiers for data mappers. Allows for easy construction of DataMapperBindings when in the proper thread scope.

The user is required to call @{link resolveBindings} when in the scope that the resulting bindings will be used in.

  • Constructor Details

  • Method Details

    • addFieldBindings

      public void addFieldBindings(List<BindPoint> bindPoints)
    • addFieldBinding

      public void addFieldBinding(String bindPointName, String genSpec)
      Add a named binding specifier to the template
      Parameters:
      bindPointName - the name associated with the binding specifier
      genSpec - the binding specifier
    • addFieldBindings

      public BindingsTemplate addFieldBindings(Map<String,String> bindPairs)
      Add multiple named bindings to the template
      Parameters:
      bindPairs - A map of named binding specifiers
    • getDiagnostics

      public String getDiagnostics()
    • resolveBindings

      public Bindings resolveBindings()
      Use the data mapping library and the specifier to create instances of data mapping functions. If you need thread-aware mapping, be sure to call this in the proper thread. Each time this method is called, it creates a new instance.
      Returns:
      A set of bindings that can be used to yield mapped data values later.
    • getBindPointNames

      public List<String> getBindPointNames()
    • getDataMapperSpecs

      public List<String> getDataMapperSpecs()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(Object[] values)
    • getMap

      public Map<String,String> getMap()