解决id重复问题

yun-zuoyi
alwaysfrin 6 years ago
parent 550f15cb35
commit c4a9a4ac1e

@ -35,9 +35,9 @@ public class SnowflakeIdMaker {
private long twepoch = 1288834974657L;
private long workerIdBits = 10L;
private long workerIdBits = 5L;
private long datacenterIdBits = 5L;
private long maxWorkerId = -1L ^ (-1L << workerIdBits); //1023
private long maxWorkerId = -1L ^ (-1L << workerIdBits); //30
private long maxDatacenterId = -1L ^ (-1L << datacenterIdBits); //30
private long sequenceBits = 12L;

Loading…
Cancel
Save