@Override
    public boolean tryLock(final long time, final TimeUnit unit) throws InterruptedException {
        return tryAcquireNanos(1, unit.toNanos(time));
    }
Non reentrant lock, copied from netty project.
jraft-core/src/main/java/com/alipay/sofa/jraft/util/NonReentrantLock.java