}
private ReadLock readLock(long timeout, TimeUnit unit) {
ReadLock lock = rwlock.readLock();
try {
if (!lock.tryLock() && !lock.tryLock(timeout, unit))
throw new PermitStateTimeoutException("Cannot aquire read lock for [" + key.getName() + "] in time", key, timeout, unit);
} catch (InterruptedException ex) {
throw new IllegalStateException(ex);
}
return lock;