java.lang.Object
me.ahoo.cosid.runtime.GeneratorSpec.CosId80
- All Implemented Interfaces:
GeneratorSpec
- Enclosing interface:
GeneratorSpec
A time-based generator wider than a
long (Layout.COSID_80 by default), issuing parts and text
only. Its layout keeps the Unix epoch and milliseconds, so the text of every CosId implementation decodes alike
(D36); CosIdRuntime.start rejects a layout of 63 bits or fewer (use GeneratorSpec.Snowflake).-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface me.ahoo.cosid.runtime.GeneratorSpec
GeneratorSpec.CosId80, GeneratorSpec.Custom, GeneratorSpec.Disabled, GeneratorSpec.Instance, GeneratorSpec.PeriodicSegment, GeneratorSpec.Segment, GeneratorSpec.Snowflake, GeneratorSpec.UuidV7 -
Method Summary
Modifier and TypeMethodDescriptionbuilder()A builder of a cosid80 generator.codec()The parts codec.booleaninthashCode()layout()The layout: wider than 63 bits, with the Unix epoch and milliseconds,timeBits + seqBitsat most 63; its node bits must cover the machine bits.machine()The machine whose slot the ids carry (D37).The clock regression policy.toString()withMachine(String machine) This generator on another machine, such as a slot in a namespace shared across services.
-
Method Details
-
builder
A builder of a cosid80 generator.- Returns:
- the builder
-
layout
The layout: wider than 63 bits, with the Unix epoch and milliseconds,timeBits + seqBitsat most 63; its node bits must cover the machine bits.- Returns:
- the layout; default
Layout.COSID_80
-
regression
The clock regression policy.- Returns:
- the policy; default
ClockRegressionPolicy.DEFAULT
-
codec
The parts codec.- Returns:
- the codec; default radix 62
-
machine
The machine whose slot the ids carry (D37).- Returns:
- the machine name; empty (the default) or "default" for the
RuntimeSpec.machine()
-
withMachine
This generator on another machine, such as a slot in a namespace shared across services.- Parameters:
machine- the machine name- Returns:
- the generator
-
equals
-
hashCode
public int hashCode() -
toString
-