Package me.ahoo.cosid.time


package me.ahoo.cosid.time
Time-based generators (03-core-model.md): layouts, the time source, the clock regression policy, TimeBasedGenerator, and UuidV7Generator (D46), whose ids carry a timestamp but need no slot.
  • Class
    Description
    What a time-based generator does when the clock goes back (03-core-model.md §4): up to borrowUpTo it keeps issuing in the last time unit (borrowing from the future), up to waitUpTo it waits, beyond that it throws ClockBackwardsException.
    The parts of a time-based id (03-core-model.md §2).
    The bit layout of time-based ids, time | node | seq from the high bits down: the one place of the bit arithmetic (03-core-model.md §2).
    The time-based generator: Snowflake layouts and the 80-bit CosId alike (03-core-model.md §4).
    The time every generator reads (03-core-model.md §3); tests inject a controllable one.
    UUIDv7 ids (D46, RFC 9562 §5.7): a 48-bit Unix millisecond timestamp, version 7, a 16-bit counter (the 12 bits of rand_a and the top 4 bits of rand_b), variant 0b10 and 58 random bits.