public abstract class SnowflakeIdStateParser
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
DELIMITER |
protected long |
epoch |
protected int |
machineBit |
protected int |
machineLeft |
protected long |
machineMask |
protected int |
sequenceBit |
protected long |
sequenceMask |
protected int |
timestampBit |
protected int |
timestampLeft |
protected long |
timestampMask |
| 构造器和说明 |
|---|
SnowflakeIdStateParser(long epoch,
int timestampBit,
int machineBit,
int sequenceBit) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract java.time.format.DateTimeFormatter |
getDateTimeFormatter() |
protected abstract long |
getDiffTime(java.time.LocalDateTime timestamp) |
protected abstract java.time.LocalDateTime |
getTimestamp(long diffTime) |
static SnowflakeIdStateParser |
of(SnowflakeId snowflakeId) |
SnowflakeIdState |
parse(long id) |
SnowflakeIdState |
parse(java.lang.String friendlyId) |
public static final java.lang.String DELIMITER
protected final long epoch
protected final int sequenceBit
protected final long sequenceMask
protected final int machineBit
protected final long machineMask
protected final int machineLeft
protected final int timestampBit
protected final long timestampMask
protected final int timestampLeft
public SnowflakeIdStateParser(long epoch,
int timestampBit,
int machineBit,
int sequenceBit)
protected abstract java.time.format.DateTimeFormatter getDateTimeFormatter()
protected abstract java.time.LocalDateTime getTimestamp(long diffTime)
protected abstract long getDiffTime(java.time.LocalDateTime timestamp)
public SnowflakeIdState parse(java.lang.String friendlyId)
public SnowflakeIdState parse(long id)
public static SnowflakeIdStateParser of(SnowflakeId snowflakeId)