Package me.ahoo.cosid.segment.grouped
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 TypeMethodDescriptiondefault GroupedKeygroup()Gets the grouping key for this object.
-
Method Details
-
group
Gets the grouping key for this object.Default implementation returns
GroupedKey.NEVER, indicating this object should not be grouped.- Returns:
- the grouping key
-