File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -206,14 +206,14 @@ public void testSerialGenerate() {
206
206
207
207
* CachedUidGenerator:
208
208
209
- 适合** 持续高消耗量** 的ID分发,此方式会一定程度上的增加内存和CPU缓存占用。
209
+ 适合** 持续高消耗量** 的ID分发,也会保持证生成ID排序准确性, 此方式会一定程度上的增加内存和CPU缓存占用。
210
210
211
211
* enableFutureTime 为true时的 DefaultUidGenerator:
212
212
213
213
适合** 偶然突发的消费增加后持续保持低消耗量** 的ID分发,此方式在突发高消费时的性能要比CachedUidGenerator还要高,但不应该持续保持高消耗(可消耗的未来时间由maxBackwardSeconds控制,超出后抛出异常),因为过度使用未来时间有可能会造成服务重启后生成重复ID。
214
214
215
215
* enableFutureTime 为false时的 DefaultUidGenerator:
216
216
217
- 适合** 低消耗量实时** 的ID分发,此方式一但消耗量高于当前时间的发号量时会返回一个等待响应 ,等待下一可用时间后发出ID,最大等待时间由maxBackwardSeconds控制,超出后抛出异常。
217
+ 适合** 低消耗量实时** 的ID分发,此方式可以保正ID中的时间精确,可满足高精确性的ID排序,一但消耗量高于当前时间的发号量时会返回一个等待响应 ,等待下一可用时间后发出ID,最大等待时间由maxBackwardSeconds控制,超出后抛出异常。
218
218
219
219
对于发号性能的测式可使用此 [ 测试用例] ( https://github.com/cooperlyt/uid-generator-spring-boot/tree/master/uid-generator-spring-boot-starter/src/test/java/io/github/cooperlyt/cloud/uid ) 进行测试,并参见[ 百度UidGenerator] ( https://github.com/baidu/uid-generator )
You can’t perform that action at this time.
0 commit comments