Class PartitionLongs
java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.from_long.to_long.PartitionLongs
- All Implemented Interfaces:
LongUnaryOperator
Split the value range of Java longs into a number of offsets,
starting with Long.MIN_VALUE. This method makes it easy to construct
a set of offsets for testing, or to limit the values used a subset.
The outputs will range from Long.MIN_VALUE (-2^63) up.
This is not an exactly emulation of token range splits in Apache Cassandra.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongapplyAsLong(long operand) This method uses a divisor value with a maximum value of 2^63Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.LongUnaryOperator
andThen, compose
-
Constructor Details
-
PartitionLongs
public PartitionLongs(int partitions)
-
-
Method Details
-
applyAsLong
public long applyAsLong(long operand) This method uses a divisor value with a maximum value of 2^63- Specified by:
applyAsLongin interfaceLongUnaryOperator- Parameters:
operand-- Returns:
-