@Override
    protected boolean tryAcquire(final int acquires) {
        if (compareAndSetState(0, 1)) {
            this.owner = Thread.currentThread();
            return true;
        }
        return false;
    }
Non reentrant lock, copied from netty project.
jraft-core/src/main/java/com/alipay/sofa/jraft/util/NonReentrantLock.java