Interface RangeSharding<T extends Comparable<? super T>>

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<? super T>>
Range-based sharding algorithm interface.

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

  • Method Summary

    Modifier and Type
    Method
    Description
    sharding(ShardingRange<T> shardingValue)
    Gets the nodes that should handle the given range of IDs.
  • Method Details

    • sharding

      Collection<String> sharding(ShardingRange<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