补充 ID 生成器的 Javadoc。

unit-tests
ZhouXY108 2024-12-27 15:24:19 +08:00
parent 491499d265
commit 8871f35749
3 changed files with 32 additions and 8 deletions

View File

@ -21,9 +21,17 @@ import java.util.Objects;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import com.google.common.annotations.Beta;
@Beta
/**
* ID
*
* <p>
* UUID IDSeata
* </p>
*
* @see UUID
* @see IdWorker
* @author <a href="http://zhouxy.xyz:3000/ZhouXY108}">ZhouXY</a>
*/
public class IdGenerator {
// ===== UUID =====

View File

@ -24,7 +24,26 @@ import java.util.concurrent.atomic.AtomicLong;
import xyz.zhouxy.plusone.commons.exception.system.NoAvailableMacFoundException;
/**
* Seata ID
* <p>
*
* <ol>
* <li>线idid</li>
* <li> 4096 id id</li>
* </ol>
* </p>
* <p>
*
* <ul>
* <li><a href="https://seata.apache.org/zh-cn/blog/seata-analysis-UUID-generator/">SeataUUID</a></li>
* <li><a href="https://seata.apache.org/zh-cn/blog/seata-snowflake-explain"></a></li>
* <li><a href="https://juejin.cn/post/7264387737276203065"></a></li>
* <li><a href="https://juejin.cn/post/7265516484029743138"></a></li>
* </ul>
* </p>
* @author <a href="http://zhouxy.xyz:3000/ZhouXY108}">ZhouXY</a>
*/
public class IdWorker {
/**

View File

@ -18,12 +18,9 @@ package xyz.zhouxy.plusone.commons.util;
import java.util.concurrent.TimeUnit;
import com.google.common.annotations.Beta;
/**
* Twitter_Snowflake
* Twitter
*/
@Beta
public class SnowflakeIdGenerator {
// ==============================Fields===========================================