public class SecondSnowflakeIdStateParser extends SnowflakeIdStateParser
| Modifier and Type | Field and Description |
|---|---|
static java.time.format.DateTimeFormatter |
DATE_TIME_FORMATTER |
DELIMITER, epoch, machineBit, machineLeft, machineMask, sequenceBit, sequenceMask, timestampBit, timestampLeft, timestampMask, zoneId| Constructor and Description |
|---|
SecondSnowflakeIdStateParser(long epoch,
int timestampBit,
int machineBit,
int sequenceBit) |
SecondSnowflakeIdStateParser(long epoch,
int timestampBit,
int machineBit,
int sequenceBit,
java.time.ZoneId zoneId) |
| Modifier and Type | Method and Description |
|---|---|
protected java.time.format.DateTimeFormatter |
getDateTimeFormatter() |
protected long |
getDiffTime(java.time.LocalDateTime timestamp) |
protected java.time.LocalDateTime |
getTimestamp(long diffTime) |
static SecondSnowflakeIdStateParser |
of(SnowflakeId snowflakeId) |
static SecondSnowflakeIdStateParser |
of(SnowflakeId snowflakeId,
java.time.ZoneId zoneId) |
getZoneId, parse, parse, parseMachineId, parseSequence, parseTimestamppublic static final java.time.format.DateTimeFormatter DATE_TIME_FORMATTER
public SecondSnowflakeIdStateParser(long epoch,
int timestampBit,
int machineBit,
int sequenceBit)
public SecondSnowflakeIdStateParser(long epoch,
int timestampBit,
int machineBit,
int sequenceBit,
java.time.ZoneId zoneId)
protected java.time.format.DateTimeFormatter getDateTimeFormatter()
getDateTimeFormatter in class SnowflakeIdStateParserprotected java.time.LocalDateTime getTimestamp(long diffTime)
getTimestamp in class SnowflakeIdStateParserprotected long getDiffTime(java.time.LocalDateTime timestamp)
getDiffTime in class SnowflakeIdStateParserpublic static SecondSnowflakeIdStateParser of(SnowflakeId snowflakeId)
public static SecondSnowflakeIdStateParser of(SnowflakeId snowflakeId, java.time.ZoneId zoneId)