public class SeataSnowflake extends Object implements Generator<Long>, Serializable
符号位(1bit) - 节点标志ID(10bit)- 时间戳相对值(41bit) - 递增序号(12bit) (0) - (0000000000) - (0000000000 0000000000 0000000000 0000000000 0) - (000000000000)
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_TWEPOCH
默认的起始时间,为2020-05-03
|
protected static int |
MAX_NODE_ID
节点ID的最大值,1023
|
Constructor and Description |
---|
SeataSnowflake()
构造
|
SeataSnowflake(Date epochDate,
Long nodeId)
构造
|
SeataSnowflake(Long nodeId)
构造
|
public static final long DEFAULT_TWEPOCH
protected static final int MAX_NODE_ID
public SeataSnowflake()
public SeataSnowflake(Long nodeId)
nodeId
- 节点IDCopyright © 2025. All rights reserved.