public void acquire(Duration timeout) throws UncheckedTimeoutException {
        ThreadLockStats threadLockStats = LockStats.getForCurrentThread();
        threadLockStats.invokingAcquire(lockPath, timeout);

        final boolean acquired;
        try {
            acquired = mutex.acquire(timeout.toMillis(), TimeUnit.MILLISECONDS);
        } catch (Exception e) {
            threadLockStats.acquireFailed();
            throw new RuntimeException("Exception acquiring lock '" + lockPath + "'", e);
        }

        if (!acquired) {
            threadLockStats.acquireTimedOut();
            throw new UncheckedTimeoutException("Timed out after waiting " + timeout +
                                                " to acquire lock '" + lockPath + "'");
        }

        threadLockStats.lockAcquired();
    }
Take the lock with the given timeout. This may be called multiple times from the same thread - each matched by a close
zkfacade/src/main/java/com/yahoo/vespa/curator/Lock.java