Interface RangeSharding<T extends Comparable<?>>

Type Parameters:
T - the type of comparable sharding value
All Known Subinterfaces:
Sharding<T>
All Known Implementing Classes:
CachedSharding, IntervalTimeline, ModCycle

public interface RangeSharding<T extends Comparable<?>>
Range-based sharding algorithm interface.

Determines which node(s) should handle a range of ID values.

  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull Collection<String>
    sharding(com.google.common.collect.Range<T> shardingValue)
    Gets the nodes that should handle the given range of IDs.
  • Method Details

    • sharding

      @NonNull Collection<String> sharding(com.google.common.collect.Range<T> shardingValue)
      Gets the nodes that should handle the given range of IDs.
      Parameters:
      shardingValue - the range of sharding values
      Returns:
      collection of node names that should handle the range