10601061106210631064106510661067106810691070
*/ @Override public void clear(final K key) throws Exception, UnsupportedOperationException { WriteLock writeLock = readWriteLock.writeLock(); writeLock.lock(); try { keyedPool.clear(key); } finally { writeLock.unlock(); }
10741075107610771078107910801081108210831084
* {@inheritDoc} */ @Override public void close() { WriteLock writeLock = readWriteLock.writeLock(); writeLock.lock(); try { keyedPool.close(); } catch (Exception e) { // swallowed as of Pool 2 } finally {
754755756757758759760761762763764
*/ @Override public T borrowObject() throws Exception, NoSuchElementException, IllegalStateException { WriteLock writeLock = readWriteLock.writeLock(); writeLock.lock(); try { return pool.borrowObject(); } finally { writeLock.unlock(); }
768769770771772773774775776777778
* {@inheritDoc} */ @Override public void returnObject(final T obj) { WriteLock writeLock = readWriteLock.writeLock(); writeLock.lock(); try { pool.returnObject(obj); } catch (Exception e) { // swallowed as of Pool 2 } finally {
784785786787788789790791792793794
* {@inheritDoc} */ @Override public void invalidateObject(final T obj) { WriteLock writeLock = readWriteLock.writeLock(); writeLock.lock(); try { pool.invalidateObject(obj); } catch (Exception e) { // swallowed as of Pool 2 } finally {
801802803804805806807808809810811
*/ @Override public void addObject() throws Exception, IllegalStateException, UnsupportedOperationException { WriteLock writeLock = readWriteLock.writeLock(); writeLock.lock(); try { pool.addObject(); } finally { writeLock.unlock(); }
843844845846847848849850851852853
* {@inheritDoc} */ @Override public void clear() throws Exception, UnsupportedOperationException { WriteLock writeLock = readWriteLock.writeLock(); writeLock.lock(); try { pool.clear(); } finally { writeLock.unlock(); }
857858859860861862863864865866867
* {@inheritDoc} */ @Override public void close() { WriteLock writeLock = readWriteLock.writeLock(); writeLock.lock(); try { pool.close(); } catch (Exception e) { // swallowed as of Pool 2 } finally {
7172737475767778798081
} finally { readLock.unlock(); } try { writeLock.lock(); // Set the current settings for this socket wrapper.setBlockingStatus(block); if (block) { Socket.timeoutSet(socket, endpoint.getSoTimeout() * 1000); } else {
6768697071727374757677
readLock.unlock(); } if (!readDone) { try { writeLock.lock(); wrapper.setBlockingStatus(block); // Set the current settings for this socket Socket.optSet(socket, Socket.APR_SO_NONBLOCK, (block ? 0 : 1)); // Downgrade the lock try {