diff --git a/src/main/java/xyz/zhouxy/plusone/commons/util/IdGenerator.java b/src/main/java/xyz/zhouxy/plusone/commons/util/IdGenerator.java index 66051a9..2bf8276 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/util/IdGenerator.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/util/IdGenerator.java @@ -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 生成器 + * + *
+ * 生成 UUID 和 修改版雪花ID(Seata 版本) + *
+ * + * @see UUID + * @see IdWorker + * @author ZhouXY + */ public class IdGenerator { // ===== UUID ===== diff --git a/src/main/java/xyz/zhouxy/plusone/commons/util/IdWorker.java b/src/main/java/xyz/zhouxy/plusone/commons/util/IdWorker.java index e806cb2..20b59bc 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/util/IdWorker.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/util/IdWorker.java @@ -24,7 +24,26 @@ import java.util.concurrent.atomic.AtomicLong; import xyz.zhouxy.plusone.commons.exception.system.NoAvailableMacFoundException; - +/** + * Seata 提供的修改版雪花ID。 + *+ * 大体思路为: + *
+ * 详情见以下介绍: + *
+ * + * @author ZhouXY + */ public class IdWorker { /** diff --git a/src/main/java/xyz/zhouxy/plusone/commons/util/SnowflakeIdGenerator.java b/src/main/java/xyz/zhouxy/plusone/commons/util/SnowflakeIdGenerator.java index c89a4bc..da9f71e 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/util/SnowflakeIdGenerator.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/util/SnowflakeIdGenerator.java @@ -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===========================================