public long getLastCommittedIndex() {
        long stamp = this.stampedLock.tryOptimisticRead();
        final long optimisticVal = this.lastCommittedIndex;
        if (this.stampedLock.validate(stamp)) {
            return optimisticVal;
        }
        stamp = this.stampedLock.readLock();
        try {
            return this.lastCommittedIndex;
        } finally {
            this.stampedLock.unlockRead(stamp);
        }
    }
Ballot box for voting.
@author boyan (boyan@alibaba-inc.com)

2018-Apr-04 2:32:10 PM
jraft-core/src/main/java/com/alipay/sofa/jraft/core/BallotBox.java