Class DefaultSegmentId

java.lang.Object
me.ahoo.cosid.segment.DefaultSegmentId
All Implemented Interfaces:
IdGenerator, SegmentId, Statistical, StringIdGenerator

public class DefaultSegmentId extends Object implements SegmentId
Default segment algorithm ID generator.
  • Constructor Details

  • Method Details

    • current

      public IdSegment current()
      Specified by:
      current in interface SegmentId
    • generate

      public long generate()
      Description copied from interface: IdGenerator
      Generate distributed ID.
      Specified by:
      generate in interface IdGenerator
      Returns:
      generated distributed ID