public class SnowFlakeIdWorker extends Object implements IdGenerator<Long>
Constructor and Description |
---|
SnowFlakeIdWorker(long workerId,
long dataCenterId) |
public SnowFlakeIdWorker(long workerId, long dataCenterId)
workerId
- 工作ID (0~31)dataCenterId
- 数据中心ID (0~31)public Long nextId()
IdGenerator
nextId
in interface IdGenerator<Long>
Copyright © 2024. All rights reserved.