Package io.adamantic.quicknote.types
Class Message.IDGenerator
java.lang.Object
io.adamantic.quicknote.types.Message.IDGenerator
- Enclosing class:
- Message
A very basic message id generator.
IMPORTANT: reloading this class will restart the numbering (there is no persistence). This is a very basic and - we should say - naive implementation, mostly for testing purposes and basic use cases. Please pass your own ID - generated however you want, but make sure it is unique across your system if you want to save it somewhere.
Replace with your own implementation for concrete use cases.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
IDGenerator
public IDGenerator()
-
-
Method Details
-
nextId
public long nextId()Generates a new message id.- Returns:
- the new message id.
-