Package me.ahoo.cosid

Interface GroupedIdGenerator

All Known Implementing Classes:
PeriodicSegmentGenerator
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface GroupedIdGenerator
Generates ids grouped by period; implemented by PeriodicSegmentGenerator, and the view of a periodic-segment generator.
  • Method Summary

    Modifier and Type
    Method
    Description
    The next id of the current period; thread-safe, never the same id twice.
  • Method Details

    • generate

      GroupedId generate()
      The next id of the current period; thread-safe, never the same id twice.
      Returns:
      the id