Constructor DistributedUIDGenerator
DistributedUIDGenerator()
Create a default instance which uses the current time as the CustomEpoch the machines physical address as MachineId.
Declaration
public DistributedUIDGenerator()
DistributedUIDGenerator(long)
Creates an instance with a defined CustomEpoch.
Declaration
public DistributedUIDGenerator(long customEpoch)
Parameters
Type | Name | Description |
---|---|---|
long | customEpoch | The custom epoch is used to calculate the timestamp by taking the current time and subtracting the CustomEpoch. The value is then stored in 41 bits giving it a maximum time of 69 years. |