Module me.ahoo.cosid.core
Package me.ahoo.cosid
package me.ahoo.cosid
The generator interfaces (
IdGenerator and its kinds) and the exceptions a generator throws.
Everything a caller of ids needs; CosIdRuntime builds the generators.-
ClassDescriptionThe clock went back further than the
ClockRegressionPolicyallows (03-core-model.md §4).The root of the CosId exceptions.The generator is disabled by configuration (D24, 07-runtime-and-spring.md §4.1).An id of a periodic segment: the period it belongs to and its value within the period (04-segment.md §3).Generates ids grouped by period; implemented byPeriodicSegmentGenerator, and the view of aperiodic-segmentgenerator.Generateslongids.Small combinators that replace the 4.x generator classes of the same purpose (03-core-model.md §5).An id does not fit where it goes (03-core-model.md §5): the narrower type it is converted to, or the bits left beside the random bits ofIdGenerators.uncertain(me.ahoo.cosid.IdGenerator, int, java.util.random.RandomGenerator).Generatesintids, seeIdGenerators.toInt(IdGenerator).A namespace was first used with another slot limit, tolerance or slot offset (06-stores.md §1): every client of a namespace must use the samebits,toleranceandslotOffset.Generates ids as their parts, for layouts wider than alongsuch as the 80-bit CosId; implemented byTimeBasedGenerator, and the view of acosid80generator.A reservation would passLong.MAX_VALUE: ranges never wrap around (04-segment.md §1, S5).The range key is sealed: it never issues a range again (04-segment.md §1, S6).No range could be reserved within the reserve timeout, or a refill is backing off after a failure (04-segment.md §2.1).The machine slot binding a generator read was invalidated: its lease was lost (05-machine-lease.md §4.2).The timestamp to issue lies beyond the ceiling of the slot window (05-machine-lease.md §3).AnIdGeneratorpaired with theIdCodecthat turns its ids into text.The time of a time-based generator no longer fits the time bits of its layout (03-core-model.md §4); replaces 4.xTimestampOverflowException.