@Override
    protected boolean tryRelease(final int releases) {
        if (Thread.currentThread() != this.owner) {
            throw new IllegalMonitorStateException("Owner is " + this.owner);
        }
        this.owner = null;
        setState(0);
        return true;
    }
Non reentrant lock, copied from netty project.
jraft-core/src/main/java/com/alipay/sofa/jraft/util/NonReentrantLock.java