@Override
    protected boolean isHeldExclusively() {
        return getState() != 0 && this.owner == Thread.currentThread();
    }
Non reentrant lock, copied from netty project.
jraft-core/src/main/java/com/alipay/sofa/jraft/util/NonReentrantLock.java