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