private void recordVersionWithoutBitSet(long version) { if ((version - this.version) > 1) { this.addException(this.version, version); logRecordVersion(version); this.version = version; return; } if (this.version > version) { this.addOlderVersion(version); } this.version = Math.max(this.version, version); }
private void recordVersionWithBitSet(long version) { if (this.version == version) { if (version >= this.bitSetVersion) { setVersionInBitSet(version); } this.addOlderVersion(version); return; } flushBitSetDuringRecording(version); if (version >= this.bitSetVersion) { if (this.getSpecialException() != null) { this.addOlderVersion(version); } setVersionInBitSet(version); this.version = Math.max(this.version, version); return; } this.addOlderVersion(version); this.version = Math.max(this.version, version); }