Class StringSegmentId

java.lang.Object
me.ahoo.cosid.StringIdGeneratorDecorator
me.ahoo.cosid.segment.StringSegmentId
All Implemented Interfaces:
Decorator<IdGenerator>, IdGenerator, IdGeneratorDecorator, SegmentId, Statistical, StringIdGenerator

public class StringSegmentId extends StringIdGeneratorDecorator implements SegmentId
String SegmentId.
  • Constructor Details

  • Method Details

    • current

      public IdSegment current()
      Description copied from interface: SegmentId
      Get the current ID segment being used for generation.

      This method returns the segment from which IDs are currently being allocated. The segment contains the range of available IDs and tracks the current position within that range.

      Specified by:
      current in interface SegmentId
      Returns:
      The current ID segment
    • stat

      public IdGeneratorStat stat()
      Description copied from interface: SegmentId
      Get statistical information about this Segment ID generator.

      This method provides detailed information about the generator's current state, including segment metadata and availability status.

      Specified by:
      stat in interface IdGenerator
      Specified by:
      stat in interface IdGeneratorDecorator
      Specified by:
      stat in interface SegmentId
      Specified by:
      stat in interface Statistical
      Returns:
      Statistical information about this Segment ID generator