- Improved documentation about generator's clock rollback behavior
- Updated gradlew
Most notably, v3 switches the letter case of generated IDs from uppercase (e.g., "036Z951MHJIKZIK2GSL81GR7L") to lowercase (e.g., "036z951mhjikzik2gsl81gr7l"), though it is technically not supposed to break existing code because SCRU128 is a case-insensitive scheme. Other changes include the removal of deprecated APIs.
- Deprecated items:
Scru128Generator#generateCore()
Scru128Generator#getLastStatus()
andScru128Generator.Status
- Letter case of generated IDs from uppercase to lowercase
- Edge case behavior of generator functions' rollback allowance handling
- Updated gradlew
- Error messages thrown by
Scru128Id
to improve error reporting
- Updated gradlew and development dependencies
- Tweaked docs and tests
generateOrAbort()
andgenerateOrAbortCore()
toScru128Generator
(formerly named asgenerateNoRewind()
andgenerateCoreNoRewind()
)Scru128Generator#generateOrResetCore()
Scru128Generator#generateCore()
Scru128Generator#getLastStatus()
andScru128Generator.Status
generateNoRewind()
andgenerateCoreNoRewind(long, long)
toScru128Generator
(experimental)
- Updated gradlew and compile-time/development dependencies
- Improved documentation about generator method flavors
- Iterable and Iterator implementations to
Scru128Generator
to make it work as infinite iterator
- Updated gradlew and compile-time/development dependencies
generateCore()
to updatecounter_hi
whentimestamp
passed < 1000
generateCore()
to reject zero astimestamp
value
generateCore()
andgetLastStatus()
toScru128Generator
- Textual representation: 26-digit Base32 -> 25-digit Base36
- Field structure: {
timestamp
: 44 bits,counter
: 28 bits,per_sec_random
: 24 bits,per_gen_random
: 32 bits } -> {timestamp
: 48 bits,counter_hi
: 24 bits,counter_lo
: 24 bits,entropy
: 32 bits } - Timestamp epoch: 2020-01-01 00:00:00.000 UTC -> 1970-01-01 00:00:00.000 UTC
- Counter overflow handling: stall generator -> increment timestamp
Scru128Id.serialVersionUID
: 3L -> 4L
Scru128.setLogger()
as counter overflow is no longer likely to occurScru128.TIMESTAMP_BIAS
Scru128Id#getCounter()
,Scru128Id#getPerSecRandom()
,Scru128Id#getPerGenRandom()
Scru128Id#getCounterHi()
,Scru128Id#getCounterLo()
,Scru128Id#getEntropy()
- Initial stable release