Releases a PooledConnection.  It is safe to release
it multiple times.  The connection should have either
been closed or reset before this is called because
this makes the connection available for the next request.
551350
private void release(PooledConnection<C> pooledConnection) {
		long currentTime = System.currentTimeMillis();
		long useTime;
		synchronized(pooledConnection) {
			pooledConnection.releaseTime = currentTime;
			useTime = currentTime - pooledConnection.startTime;
			if(useTime>0) pooledConnection.totalTime.addAndGet(useTime);
			pooledConnection.allocateStackTrace = null;
		}
		// Remove from the pool
		synchronized(poolLock) {
			try {
				if(busyConnections.remove(pooledConnection)) availableConnections.add(pooledConnection);
			} finally {
				poolLock.notify();
			}
		}
	}
317289
def close(self):
        '''
        
        '''
        if self._wrapped_connection and self._pool:
            logger.debug("Returning connection %s to pool %s" % (self._wrapped_connection, self._pool))
            self._pool.putconn(self._wrapped_connection)
            self._wrapped_connection = None
1007558
def free(self):
        
        LOGGER.debug('Connection %s freeing', self.id)
        if self.handle.isexecuting():
            raise ConnectionBusyError(self)
        with self._lock:
            self.used_by = None
        LOGGER.debug('Connection %s freed', self.id)
821936
public void release(PooledWsByteBufferImpl buffer) {
        if (inUseTable != null) {
            inUseTable.remove(buffer);
        }
        boolean pooled = pool.put(buffer);
        if (isDirectPool && !pooled) {
            destroy(buffer);
        }
    }
669027
public void release(Object o)
    {
        synchronized(this)
        {
            usedPool.remove(o);
            freePool.add(o);
            notify();
        }
    }
441226
public void release() throws IOException {
    for (BufferPool.Buffer b: buffers) {
      PooledBuffers.release(b);
    }

    buffers.clear();
    count = 0;
  }
973067
def _safe_release_connection(self):
        
        try:
            self.adapter.release_connection()
        except Exception as exc:
            logger.debug(
                'Error releasing connection for node {}: {!s}\n{}'
                .format(self.node.name, exc, traceback.format_exc())
            )
            return dbt.compat.to_string(exc)

        return None
798217
def release(self, connection: Connection):
        '''
        '''
        assert not self._closed

        key = connection.key
        host_pool = self._host_pools[key]

        _logger.debug('Check in %s', key)

        yield from host_pool.release(connection)

        force = self.count() > self._max_count
        yield from self.clean(force=force)
983979
@Override
    public void connectionReleased(IManagedConnectionEvent<C> event) {
        IPhynixxManagedConnection<C> proxy = event.getManagedConnection();
        if (LOG.isDebugEnabled()) {
            LOG.debug("Proxy " + proxy + " released");
        }

    }
262065
protected void closeConnection(ConnectionHandle connection) {
		if (connection != null) {
			try {
				connection.internalClose();
			} catch (Throwable t) {
				logger.error("Destroy connection exception", t);
			} finally {
				this.pool.postDestroyConnection(connection);
			}
		}
}
509271
void releaseConnection(ConnectionPool pool, Cassandra.Client conn)
    {
        if (pool != null && conn != null)
        {
            pool.release(conn);
        }
    }
321239
public void free(Connection connection) {
        try {
            if (!connection.isClosed()){
                // ensure connections returned to pool as read-only
                setConnectionReadOnly(connection, true);
                connection.close();
            } else {
                logger.debug("Ignoring attempt to close a previously closed connection");
            }
        } catch (SQLException sqle) {
            logger.warn("Unable to close connection", sqle);
        } finally {
            if (logger.isDebugEnabled()) {
                logger.debug("Returned connection to pool (" + toString() + ")");
            }
        }
    }
419455
public function release()
    {
        if ($this->released) {
            throw new LockAlreadyReleasedError('The lock has already been released!');
        }

        // Invoke the releaser function given to us by the synchronization source
        // to release the lock.
        ($this->releaser)($this);
        $this->released = true;
    }
1141793
protected void closeConnection(DatabaseConnection connection) throws SQLException {
		// this can return null if we are closing the pool
		ConnectionMetaData meta = connectionMap.remove(connection);
		IOUtils.closeThrowSqlException(connection, "SQL connection");
		logger.debug("closed connection {}", meta);
		closeCount++;
	}
1307212
@FFDCIgnore(value = { InterruptedException.class })
    public void close() {
        // remove all the clients from the deque, closing them as we go
        while (numClientsClosed.get() < numClients) {
            try {
                Client client = clients.takeFirst();
                try {
                    client.close();
                } catch (Exception e) {
                    //Ignore this
                }
                numClientsClosed.incrementAndGet();

                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                    Tr.event(tc, "pool closed   - " + numClientsClosed + " of " + numClients + " clients closed");
            } catch (InterruptedException e) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                    Tr.event(tc, "InterruptedException during close - will retry");
            }
        }
    }
7935
private void discardIdleConnections() {
        List<Connection<CL>> connections = Lists.newArrayList();
        availableConnections.drainTo(connections);
        activeCount.addAndGet(-connections.size());

        for (Connection<CL> connection : connections) {
            try {
                closedConnections.incrementAndGet();
                connection.close(); // This is usually an async operation
            }
            catch (Throwable t) {
                // TODO
            }
        }
    }
81981
public synchronized void release()
    {
        if (_in!=null)
        {
            try{_in.close();}catch(IOException e){LogSupport.ignore(log,e);}
            _in=null;
        }

        if (_connection!=null)
            _connection=null;
    }