- All Known Implementing Classes:
SegmentGenerator,TimeBasedGenerator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Generates
long ids.-
Method Summary
-
Method Details
-
generate
long generate()The next id. An implementation, such as one given as acustomgenerator, is thread-safe: any number of threads call it concurrently, and it never issues an id twice.- Returns:
- the id
-