/** Acquires write lock on the given key. */ protected final void lockForWriting(L key) { locks.acquireLock(key, true); }
/** Acquires read lock on the given key. */ protected final void lockForReading(L key) { locks.acquireLock(key, false); }
/** Same as {@link #lockForWriting(Object)}, but with 0 timeout. */ protected final boolean immediateLockForWriting(L key) { return locks.acquireLock(key, true, 0); }