@Deprecated public class Sequence extends Object
序列号
Created: 2018/6/15 上午11:41
Project: heaven
| 限定符和类型 | 方法和说明 |
|---|---|
protected static long |
getDatacenterId(long maxDatacenterId)
已过时。
数据标识id部分
|
protected static long |
getMaxWorkerId(long datacenterId,
long maxWorkerId)
已过时。
获取 maxWorkerId
|
long |
nextId()
已过时。
获取下一个ID
|
protected long |
tilNextMillis(long lastTimestamp)
已过时。
|
protected long |
timeGen()
已过时。
|
public Sequence()
public Sequence(long workerId,
long datacenterId)
workerId - 工作机器IDdatacenterId - 序列号protected static long getMaxWorkerId(long datacenterId,
long maxWorkerId)
datacenterId - 客户端编号maxWorkerId - 机器标识protected static long getDatacenterId(long maxDatacenterId)
maxDatacenterId - 最大标识public long nextId()
protected long tilNextMillis(long lastTimestamp)
protected long timeGen()
Copyright © 2024. All rights reserved.