@Override
    public void resetFirstIndex(final long firstIndex) {
        this.lock.lock();
        try {
            Requires.requireTrue(this.queue.isEmpty(), "Queue is not empty.");
            this.firstIndex = firstIndex;
        } finally {
            this.lock.unlock();
        }
    }
Closure queue implementation.

@author boyan (boyan@alibaba-inc.com)

2018-Mar-28 11:44:01 AM
jraft-core/src/main/java/com/alipay/sofa/jraft/closure/ClosureQueueImpl.java