111112113114115116117118119120121
WriteLock lock = logLock.writeLock(); try { lock.lock(); committedLog.clear(); } finally { lock.unlock(); } initialized = false; } /**
260261262263264265266267268269270
p.packet = pp; p.request = request; committedLog.add(p); maxCommittedLog = p.packet.getZxid(); } finally { wl.unlock(); } } /**
8283848586878889909192
} // Downgrade the lock readLock.lock(); try { writeLock.unlock(); return doWriteInternal(b, off, len); } finally { readLock.unlock(); } } finally {
919293949596979899100101
} } finally { // Should have been released above but may not have been on some // exception paths if (writeLock.isHeldByCurrentThread()) { writeLock.unlock(); } } }
644645646647648649650651652653654
Socket.timeoutSet(socket, 0); } // Downgrade the lock readLock.lock(); try { writeLock.unlock(); result = Socket.recvbb(socket, 0, buf.length - lastValid); } finally { readLock.unlock(); } } finally {
653654655656657658659660661662663
} } finally { // Should have been released above but may not have been on some // exception paths if (writeLock.isHeldByCurrentThread()) { writeLock.unlock(); } } } return result;
755756757758759760761762763764765
WriteLock writeLock = readWriteLock.writeLock(); writeLock.lock(); try { return pool.borrowObject(); } finally { writeLock.unlock(); } } /** * {@inheritDoc}
771772773774775776777778779780781
try { pool.returnObject(obj); } catch (Exception e) { // swallowed as of Pool 2 } finally { writeLock.unlock(); } } /** * {@inheritDoc}
787788789790791792793794795796797
try { pool.invalidateObject(obj); } catch (Exception e) { // swallowed as of Pool 2 } finally { writeLock.unlock(); } } /** * {@inheritDoc}
802803804805806807808809810811812
WriteLock writeLock = readWriteLock.writeLock(); writeLock.lock(); try { pool.addObject(); } finally { writeLock.unlock(); } } /** * {@inheritDoc}