- All Known Implementing Classes:
GeneratorSpec.CosId80,GeneratorSpec.Custom,GeneratorSpec.Disabled,GeneratorSpec.Instance,GeneratorSpec.PeriodicSegment,GeneratorSpec.Segment,GeneratorSpec.Snowflake,GeneratorSpec.UuidV7
public sealed interface GeneratorSpec
permits GeneratorSpec.Snowflake, GeneratorSpec.CosId80, GeneratorSpec.Segment, GeneratorSpec.PeriodicSegment, GeneratorSpec.Custom, GeneratorSpec.Instance, GeneratorSpec.UuidV7, GeneratorSpec.Disabled
A generator of a
RuntimeSpec, by strategy.
The variants are the current snapshot of a closed set of specs: a minor version may add a variant, so keep a
default branch in a switch over them (D40). The strategy variants are immutable and built with their
builders, the only way to create one, so fields can be added with a default (api-freeze.md §4).
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA time-based generator wider than along(Layout.COSID_80by default), issuing parts and text only.static final classA userlonggenerator by reference, for configuration:CosIdRuntime.startresolves the reference throughRuntimeOptions.generators()and fails when it resolves to nothing.static final recordA declared generator that is not created (D24, 07-runtime-and-spring.md §4.1): looking it up throwsGeneratorDisabledException.static final classA userlonggenerator instance, for specs built in code.static final classA periodic segment generator.static final classA segment generator.static final classA time-based generator packinglongids.static final classUUIDv7 ids (D46, RFC 9562 §5.7, a 16-bit counter):UuidV7Generator, ordered within the instance and unique without coordination.