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 intapplyAsInt(long value)
-
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:
applyAsIntin interfacejava.util.function.LongToIntFunction
-