public void lock() throws ConversationLockException { try { boolean acquired = lock.tryLock(timeoutSeconds, TimeUnit.SECONDS); if (!acquired) { throw new LockTimeoutException(timeoutSeconds); } } catch (InterruptedException e) { throw new LockInterruptedException(e); } }