IdGen v3.0.0 Release Notes
Release Date: 2020-07-06 // almost 3 years ago-
๐ This release contains a few (minor) breaking changes. Generated 2.x ID's are still compatible with 3.x ID's.
- Most of the constructor overloads for the
IdGenerator
have been replaced with a single constructor which acceptsIdGeneratorOptions
that contains theITimeSource
,IdStructure
andSequenceOverflowStrategy
. - The
MaskConfig
class is now more appropriately namedIdStructure
since it describes the structure of the generated ID's. - ๐ The
UseSpinWait
property has moved to theIdGeneratorOptions
and is now an enum of typeSequenceOverflowStrategy
instead of a boolean value. Note that this property has also been renamed in the config file (fromuseSpinWait
tosequenceOverflowStrategy
) and is no longer a boolean butrequires
one of the values fromSequenceOverflowStrategy
. ID
is nowId
(only used as return value by theFromId(...)
method)
- Most of the constructor overloads for the
Previous changes from v2.4.1
-
๐ง The
IdGenerator
now offers a spinwaiting strategy when a sequenceoverflow occurs instead of throwing aSequenceOverflowException
. This will spinwait until the next tick and then return a new Id. New constructoroverloads have been added to be able to set this property at construction time. Also the configuration package supports this new option with auseSpinWait
attribute on theidGenerator
element.