Class NullOrLoad

java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.stateful.NullOrLoad
All Implemented Interfaces:
java.util.function.LongFunction<java.lang.Object>

public class NullOrLoad
extends java.lang.Object
implements java.util.function.LongFunction<java.lang.Object>
Reads a long variable from the input, hashes and scales it to the unit interval 0.0d - 1.0d, then uses the result to determine whether to return null object or a loaded value.
  • Constructor Summary

    Constructors 
    Constructor Description
    NullOrLoad​(double ratio, java.lang.String varname)  
  • Method Summary

    Modifier and Type Method Description
    java.lang.Object apply​(long basis)  

    Methods inherited from class java.lang.Object

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

    • NullOrLoad

      public NullOrLoad​(double ratio, java.lang.String varname)
  • Method Details

    • apply

      public java.lang.Object apply​(long basis)
      Specified by:
      apply in interface java.util.function.LongFunction<java.lang.Object>