Tanzu GemFire Distributed Types Java API Reference
Package dev.gemfire.dtype
Interface DSnowflake.Builder
-
- Enclosing interface:
- DSnowflake
public static interface DSnowflake.BuilderBuilder used to create custom DSnowflakes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DSnowflakebuild()Create a DSnowflake instanceDSnowflake.BuilderwithEpochStart(long epochStart)Specify a custom epoch startDSnowflake.BuilderwithMachineBits(int machineBits)Specify the number of bits to use for the machine IDDSnowflake.BuilderwithMachineId(long machineId)Specify a custom machine IDDSnowflake.BuilderwithSequenceBits(int sequenceBits)Specify the number of bits to use for the sequence number
-
-
-
Method Detail
-
withEpochStart
DSnowflake.Builder withEpochStart(long epochStart)
Specify a custom epoch start- Parameters:
epochStart- a custom epoch start- Returns:
- this builder
-
withMachineId
DSnowflake.Builder withMachineId(long machineId)
Specify a custom machine ID- Parameters:
machineId- a custom machine ID- Returns:
- this builder
-
withMachineBits
DSnowflake.Builder withMachineBits(int machineBits)
Specify the number of bits to use for the machine ID- Parameters:
machineBits- bits to use for the machine ID- Returns:
- this builder
-
withSequenceBits
DSnowflake.Builder withSequenceBits(int sequenceBits)
Specify the number of bits to use for the sequence number- Parameters:
sequenceBits- buts to use for the sequence number- Returns:
- this builder
-
build
DSnowflake build()
Create a DSnowflake instance- Returns:
- a new DSnowflake instance
-
-