Interface Grouped

All Known Subinterfaces:
GroupedIdSegmentDistributor, IdSegment, IdSegmentDistributor
All Known Implementing Classes:
DefaultGroupedIdSegmentDistributor, DefaultGroupedIdSegmentDistributor.GroupedBinding, DefaultIdSegment, IdSegmentChain, IdSegmentDistributor.Atomic, IdSegmentDistributor.Mock, JdbcIdSegmentDistributor, MergedIdSegment, MongoIdSegmentDistributor, ProxyIdSegmentDistributor, SpringRedisIdSegmentDistributor, ZookeeperIdSegmentDistributor

public interface Grouped
Interface for objects that can be grouped for sharding purposes.

Implementations return a GroupedKey that represents the sharding key for this object. This is used by segmented ID generators to organize IDs into logical groups.

  • Method Summary

    Modifier and Type
    Method
    Description
    default GroupedKey
    Gets the grouping key for this object.
  • Method Details

    • group

      default GroupedKey group()
      Gets the grouping key for this object.

      Default implementation returns GroupedKey.NEVER, indicating this object should not be grouped.

      Returns:
      the grouping key