Class PartitionLongs

java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.from_long.to_long.PartitionLongs
All Implemented Interfaces:
LongUnaryOperator

public class PartitionLongs extends Object implements 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 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:
      applyAsLong in interface LongUnaryOperator
      Parameters:
      operand -
      Returns: