public interface GenId
---------------------------------------------
org.teasoft.honey.distribution.PearFlowerId
---------------------------------------------
org.teasoft.honey.distribution.SerialUniqueId
Serial Unique Id in one workerid.
Advantages:continuous and unique;less clock dependent.Implemented in dB, it can achieve auto increment
of distributed global unique ID in dB. The ID number get in the same workerid can satisfy continuous
monotonic increasing uniqueness.
Shortcoming:worker1's ID org.teasoft.honey.distribution.OneTimeSnowflakeId
| Modifier and Type | Method and Description |
|---|---|
long |
get()
return the id number.
|
long[] |
getRangeId(int sizeOfIds)
Get a segment of numbers at a time and return the minimum and maximum available numbers of a batch.
|
long get()
long[] getRangeId(int sizeOfIds)
sizeOfIds - the size Of ids in one batch.Copyright © 2025. All rights reserved.