Class BindingsTemplate
java.lang.Object
io.nosqlbench.virtdata.core.bindings.BindingsTemplate
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 Summary
ConstructorsConstructorDescriptionBindingsTemplate(List<BindPoint> bindPoints) BindingsTemplate(Map<String, Object> config) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFieldBinding(String bindPointName, String genSpec) Add a named binding specifier to the templatevoidaddFieldBindings(List<BindPoint> bindPoints) addFieldBindings(Map<String, String> bindPairs) Add multiple named bindings to the templategetMap()Use the data mapping library and the specifier to create instances of data mapping functions.toString()
-
Constructor Details
-
BindingsTemplate
-
BindingsTemplate
-
BindingsTemplate
-
BindingsTemplate
-
BindingsTemplate
public BindingsTemplate()
-
-
Method Details
-
addFieldBindings
-
addFieldBinding
-
addFieldBindings
Add multiple named bindings to the template- Parameters:
bindPairs- A map of named binding specifiers
-
getDiagnostics
-
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
-
getDataMapperSpecs
-
toString
-
toString
-
getMap
-