java.lang.Object
me.ahoo.cosid.runtime.GeneratorSpec.Snowflake.Builder
- Enclosing class:
GeneratorSpec.Snowflake
Builds a
GeneratorSpec.Snowflake.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the generator.Sets the codec list, applied in order.Sets the layout; its node bits must cover the machine bits.Sets the machine whose slot the ids carry (D37).regression(ClockRegressionPolicy regression) Sets the clock regression policy.
-
Method Details
-
machine
Sets the machine whose slot the ids carry (D37).- Parameters:
machine- the machine name; default theRuntimeSpec.machine()- Returns:
- this builder
-
layout
Sets the layout; its node bits must cover the machine bits.- Parameters:
layout- the layout; defaultLayout.SNOWFLAKE_MS- Returns:
- this builder
-
regression
Sets the clock regression policy.- Parameters:
regression- the policy; defaultClockRegressionPolicy.DEFAULT- Returns:
- this builder
-
codec
Sets the codec list, applied in order.- Parameters:
codec- the codec list; default empty, for none- Returns:
- this builder
-
build
Builds the generator.- Returns:
- the generator
-