Let's suppose I have some abstract entity in the system which created each time.
Each of those entities should have two ID - Serial and Sequence.
UC
- Initial state - A(Serial=1, Sequence=1).
- Scale out - A(Serial=1, Sequence=1), A(Serial=2, Sequence=2)
- Scale in - A(Serial=1, Sequence=1)
- Scale out again - A(Serial=1, Sequence=1), A(Serial=4, Sequence=3)
Meaning that sequence id it is kind of offset that stored and previous versions is not used.
My question is - is there any patterns in Java that you would recommend to look, main aim of which is store those values in some generic data structure.
Aucun commentaire:
Enregistrer un commentaire