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

public class PartitionLongs
extends java.lang.Object
implements java.util.function.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
    Constructor Description
    PartitionLongs​(int partitions)  
  • Method Summary

    Modifier and Type Method Description
    long applyAsLong​(long operand)
    This method uses a divisor value with a maximum value of 2^63

    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.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:
      applyAsLong in interface java.util.function.LongUnaryOperator
      Parameters:
      operand -
      Returns: