Class LoadInteger

java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.stateful.from_long.LoadInteger
All Implemented Interfaces:
java.util.function.LongToIntFunction

public class LoadInteger
extends java.lang.Object
implements java.util.function.LongToIntFunction
Load a value from a named thread-local variable, where the variable name is fixed or a generated variable name from a provided function. If the named variable is not defined, then the default value is returned.
  • Constructor Summary

    Constructors 
    Constructor Description
    LoadInteger​(java.lang.String name)  
    LoadInteger​(java.lang.String name, int defaultValue)  
    LoadInteger​(java.util.function.LongFunction<java.lang.Object> nameFunc)  
    LoadInteger​(java.util.function.LongFunction<java.lang.Object> nameFunc, int defaultValue)  
  • Method Summary

    Modifier and Type Method Description
    int applyAsInt​(long value)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LoadInteger

      public LoadInteger​(java.lang.String name)
    • LoadInteger

      public LoadInteger​(java.lang.String name, int defaultValue)
    • LoadInteger

      public LoadInteger​(java.util.function.LongFunction<java.lang.Object> nameFunc)
    • LoadInteger

      public LoadInteger​(java.util.function.LongFunction<java.lang.Object> nameFunc, int defaultValue)
  • Method Details

    • applyAsInt

      public int applyAsInt​(long value)
      Specified by:
      applyAsInt in interface java.util.function.LongToIntFunction