java.lang.Object
me.ahoo.cosid.runtime.GeneratorSpec.Snowflake
- All Implemented Interfaces:
GeneratorSpec
- Enclosing interface:
GeneratorSpec
A time-based generator packing
long ids.-
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 snowflake generator.codec()The codec list, applied in order.booleaninthashCode()layout()The layout; 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.
-
Method Details
-
builder
A builder of a snowflake generator.- Returns:
- the builder
-
layout
The layout; its node bits must cover the machine bits.- Returns:
- the layout; default
Layout.SNOWFLAKE_MS
-
regression
The clock regression policy.- Returns:
- the policy; default
ClockRegressionPolicy.DEFAULT
-
codec
The codec list, applied in order.- Returns:
- the codec list; default empty, for none
-
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.- Parameters:
machine- the machine name- Returns:
- the generator
-
equals
-
hashCode
public int hashCode() -
toString
-