Tanzu GemFire Distributed Types Java API Reference
Interface DSnowflakeId.Builder
- Enclosing interface:
- DSnowflakeId
public static interface DSnowflakeId.Builder
Builder used to create custom DSnowflakeIds.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Create a DSnowflakeId instancewithEpochStart(long epochStart) Specify a custom epoch startwithMachineBits(int machineBits) Specify the number of bits to use for the machine IDwithMachineId(long machineId) Specify a custom machine IDwithSequenceBits(int sequenceBits) Specify the number of bits to use for the sequence number
-
Method Details
-
withEpochStart
Specify a custom epoch start- Parameters:
epochStart- a custom epoch start- Returns:
- this builder
-
withMachineId
Specify a custom machine ID- Parameters:
machineId- a custom machine ID- Returns:
- this builder
-
withMachineBits
Specify the number of bits to use for the machine ID- Parameters:
machineBits- bits to use for the machine ID- Returns:
- this builder
-
withSequenceBits
Specify the number of bits to use for the sequence number- Parameters:
sequenceBits- buts to use for the sequence number- Returns:
- this builder
-
build
DSnowflakeId build()Create a DSnowflakeId instance- Returns:
- a new DSnowflakeId instance
-