if (!lock.acquire(MAX_LOCK_WAIT_TIME_MS, TimeUnit.MILLISECONDS)) { String message = String.format("acquire lock failed after %s ms.", MAX_LOCK_WAIT_TIME_MS); throw new TimeoutException(message);
if (!lock.acquire(MAX_LOCK_WAIT_TIME_MS, TimeUnit.MILLISECONDS)) { String message = String.format("acquire lock failed after %s ms.", MAX_LOCK_WAIT_TIME_MS); throw new TimeoutException(message);