}
else {
this.sequence = 0;
}
if (timestamp < this.lastTimestamp) {
throw new InvalidSystemClock(String.format(
"Clock moved backwards. Refusing to generate id for %d milliseconds", this.lastTimestamp - timestamp));
}
this.lastTimestamp = timestamp;
return timestamp - twepoch << this.timestampLeftShift | this.workerId << this.workerIdShift | this.sequence;