Skip to content

Commit b8572e3

Browse files
committed
update Readme
1 parent 188da8e commit b8572e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,14 @@ public void testSerialGenerate() {
206206

207207
* CachedUidGenerator:
208208

209-
适合**持续高消耗量**的ID分发,此方式会一定程度上的增加内存和CPU缓存占用。
209+
适合**持续高消耗量**的ID分发,也会保持证生成ID排序准确性,此方式会一定程度上的增加内存和CPU缓存占用。
210210

211211
* enableFutureTime 为true时的 DefaultUidGenerator:
212212

213213
适合**偶然突发的消费增加后持续保持低消耗量**的ID分发,此方式在突发高消费时的性能要比CachedUidGenerator还要高,但不应该持续保持高消耗(可消耗的未来时间由maxBackwardSeconds控制,超出后抛出异常),因为过度使用未来时间有可能会造成服务重启后生成重复ID。
214214

215215
* enableFutureTime 为false时的 DefaultUidGenerator:
216216

217-
适合**低消耗量实时**的ID分发,此方式一但消耗量高于当前时间的发号量时会返回一个等待响应,等待下一可用时间后发出ID,最大等待时间由maxBackwardSeconds控制,超出后抛出异常。
217+
适合**低消耗量实时**的ID分发,此方式可以保正ID中的时间精确,可满足高精确性的ID排序,一但消耗量高于当前时间的发号量时会返回一个等待响应,等待下一可用时间后发出ID,最大等待时间由maxBackwardSeconds控制,超出后抛出异常。
218218

219219
对于发号性能的测式可使用此 [测试用例](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)

0 commit comments

Comments
 (0)