Interface GroupedIdSegmentDistributor

All Superinterfaces:
Grouped, IdSegmentDistributor
All Known Implementing Classes:
DefaultGroupedIdSegmentDistributor, DefaultGroupedIdSegmentDistributor.GroupedBinding

public interface GroupedIdSegmentDistributor extends IdSegmentDistributor
Extension of IdSegmentDistributor that supports ID grouping.

Grouped distributors allow ID segments to be partitioned by a grouping key (e.g., time-based buckets like "2024-01" for monthly sharding).

  • Method Details

    • allowReset

      default boolean allowReset()
      Description copied from interface: IdSegmentDistributor
      Check if this distributor allows segment resetting.

      Some distributors support resetting to earlier segments, while others only move forward to prevent ID conflicts.

      Specified by:
      allowReset in interface IdSegmentDistributor
      Returns:
      true if resetting is allowed, false otherwise