public class SnowflakeIdGenerator extends Object
| Constructor and Description |
|---|
SnowflakeIdGenerator(long workerId,
long dataCenterId) |
| Modifier and Type | Method and Description |
|---|---|
static SnowflakeIdGenerator |
getInstance() |
long |
nextId() |
protected long |
tilNextMillis(long lastTimestamp) |
protected long |
timeGen() |
public SnowflakeIdGenerator(long workerId,
long dataCenterId)
public static SnowflakeIdGenerator getInstance()
public long nextId()
protected long tilNextMillis(long lastTimestamp)
protected long timeGen()
Copyright © 2016–2021. All rights reserved.