Class NullOrPass

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

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

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

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

    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

    • NullOrPass

      public NullOrPass​(double ratio, java.lang.String varname)
  • 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>