Package me.ahoo.cosid.sharding
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 TypeMethodDescription@NonNull Collection<String>Gets the nodes that should handle the given range of IDs.
-
Method Details
-
sharding
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
-