Class LoadElement

java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.stateful.LoadElement
All Implemented Interfaces:
io.nosqlbench.virtdata.api.config.ConfigAware, java.util.function.Function<java.lang.Object,​java.lang.Object>

public class LoadElement
extends java.lang.Object
implements java.util.function.Function<java.lang.Object,​java.lang.Object>, io.nosqlbench.virtdata.api.config.ConfigAware
Load a value from a map, based on the injected configuration. The map which is used must be named by the mapname. If the injected configuration contains a variable of this name which is also a Map, then this map is referenced and read by the provided variable name.
  • Constructor Summary

    Constructors 
    Constructor Description
    LoadElement​(java.lang.String varname, java.lang.String mapname, java.lang.Object defaultValue)  
  • Method Summary

    Modifier and Type Method Description
    java.lang.Object apply​(java.lang.Object o)  
    void applyConfig​(java.util.Map<java.lang.String,​?> element)  
    io.nosqlbench.virtdata.api.config.ConfigModel getConfigModel()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Constructor Details

    • LoadElement

      public LoadElement​(java.lang.String varname, java.lang.String mapname, java.lang.Object defaultValue)
  • Method Details

    • apply

      public java.lang.Object apply​(java.lang.Object o)
      Specified by:
      apply in interface java.util.function.Function<java.lang.Object,​java.lang.Object>
    • applyConfig

      public void applyConfig​(java.util.Map<java.lang.String,​?> element)
      Specified by:
      applyConfig in interface io.nosqlbench.virtdata.api.config.ConfigAware
    • getConfigModel

      public io.nosqlbench.virtdata.api.config.ConfigModel getConfigModel()
      Specified by:
      getConfigModel in interface io.nosqlbench.virtdata.api.config.ConfigAware