Class ConsistentHashing

java.lang.Object
io.fluxcapacitor.common.ConsistentHashing

public class ConsistentHashing extends Object
  • Constructor Details

    • ConsistentHashing

      public ConsistentHashing()
  • Method Details

    • computeSegment

      public static int computeSegment(String routingKey)
    • computeSegment

      public static int computeSegment(String routingKey, int maxSegments)
    • computeSegment

      public static int computeSegment(String routingKey, Function<String,Integer> hashFunction, int maxSegments)
    • fallsInRange

      public static boolean fallsInRange(String routingKey, int[] segmentRange)
    • fallsInRange

      public static boolean fallsInRange(String routingKey, int[] segmentRange, int maxSegments)
    • fallsInRange

      public static boolean fallsInRange(int segment, int[] segmentRange)
    • isEmptyRange

      public static boolean isEmptyRange(int[] segmentRange)