Deletes an engine pool

 @param [Connection] connection Connection to console where site exists.
429116
def delete(connection)
      xml = %(<EnginePoolDeleteRequest session-id="#{connection.session_id}">)
      xml << %(<EnginePool name="#{@name}" scope="#{@scope}" />)
      xml << '</EnginePoolDeleteRequest>'

      r = connection.execute(xml, '1.2')
      r.success
    end
884696
public static synchronized void clearConnection(String poolName, Object mcp, Object cl, Object connection)
   {
      log.tracef("%s", new TraceEvent(poolName,
                                      Integer.toHexString(System.identityHashCode(mcp)),
                                      TraceEvent.CLEAR_CONNECTION,
                                      Integer.toHexString(System.identityHashCode(cl)),
                                      Integer.toHexString(System.identityHashCode(connection))));
   }
1030220
def Cleanup(self):
		
		self.lock.acquire()
		try:
			for bucket in self.connections.values():
				try:
					for conn in bucket:
						conn.lock()
						try:
							open = conn.TestConnection(forceCheck=True)
							if open is True:
								conn.commit()
							else:
								#Remove the connection from the pool. Its dead better of recreating it.
								index = bucket.index(conn)
								del bucket[index]
							conn.release()
						except Exception:
							conn.release()
				except Exception:
					pass
		finally:
			self.lock.release()
580633
public void removeConnectionPool(URL url) {
        RequestBuilder req = new RequestBuilder();
        req.host = url.getHost();
        req.port = url.getPort() < 0 ? url.getDefaultPort() : url.getPort();
        removePool(req);
    }
167922
@Override
    public void destroy()
    {
        // if(logger.isDebugEnabled())
        logger.info("on close destroying connection pool");

        if (getConnectionPoolOrConnection() != null && getConnectionPoolOrConnection() instanceof JedisPool)
        {
            ((JedisPool) getConnectionPoolOrConnection()).destroy();
        }
        else if (getConnectionPoolOrConnection() != null && getConnectionPoolOrConnection() instanceof Jedis)
        {
            ((Jedis) getConnectionPoolOrConnection()).disconnect();
        }

    }
886958
private function removeMigration(Connection $connection, int $index): void
    {
        $connection->delete(static::MIGRATIONS_TABLE, [static::MIGRATIONS_COLUMN_ID => $index]);
    }
1230551
def release(self, connection):
        ""
        # Make sure we haven't changed process.
        self._checkpid()
        if connection.pid != self.pid:
            return

        # Put the connection back into the pool.
        try:
            self.pool.put_nowait(connection)
        except Full:
            # perhaps the pool has been reset() after a fork? regardless,
            # we don't want this connection
            pass
530961
def delete(key)
      deleted = false
      pool = nil
      @mutex.synchronize do
        pool = @_sessions.delete(key)
      end
      if pool
        pool.shutdown!
        deleted = true
        HotTub.logger.info "[HotTub] #{key} was deleted from #{@name}." if HotTub.logger
      end
      deleted
    end
1339242
def delete(url, options = {})
      connection(url, options) do |uri, conn|
        conn.delete(uri.request_uri, options)
      end
    end
317506
def disconnect
    @connection_pool.disconnect!
    SugarCRM::Module.deregister_all(self)
    namespace = @namespace
    SugarCRM.instance_eval{ remove_const namespace } # remove NamespaceX from SugarCRM
    SugarCRM.remove_session(self)
  end
174827
private void cleanConnectionClose(Connection connection, Statement stmt) {
        try {
            // clean close
            if (connection != null) {
                connection.rollback();
            }

            if (stmt != null) {
                stmt.close();
            }

            if (connection != null) {
                connection.close();
            }
        } catch (SQLException e1) {
            e1.printStackTrace();
        }
    }
1134370
function ( name ) {
		// valid connection
		if ( name in pool ) {
			log('ws', 'exit', name, 'close');
			return delete pool[name];
		}

		// failure
		log('ws', 'del', name, 'fail to remove (invalid connection)');
		return false;
	}
676802
def purge(self, connection):
        """"""
        self._checkpid()
        if connection.pid == self.pid:
            idx = connection._pattern_idx
            if connection in self._in_use_connections[idx]:
                self._in_use_connections[idx].remove(connection)
            else:
                self._available_connections[idx].remove(connection)
            connection.disconnect()
1142186
private void deleteRelation(Object connection, EntityMetadata entityMetadata, String rowKey)
    {
        List<String> relations = entityMetadata.getRelationNames();

        if (relations != null)
        {
            for (String relation : relations)
            {
                if (resource != null && resource.isActive())
                {
                    ((Transaction) connection).hdel(getHashKey(entityMetadata.getTableName(), rowKey), relation);

                }
                else
                {
                    ((Pipeline) connection).hdel(getHashKey(entityMetadata.getTableName(), rowKey), relation);

                }
            }

        }
        /*
         * Response<Map<String, String>> fields = null; if (resource != null &&
         * resource.isActive()) { fields = ((Transaction)
         * connection).hgetAll(getHashKey(entityMetadata.getTableName(),
         * rowKey)); if (connection != null) { ((Pipeline) connection).sync(); }
         * for (String field : fields.get().keySet()) { ((Transaction)
         * connection).hdel(getHashKey(entityMetadata.getTableName(), rowKey),
         * field); } } else { fields = ((Pipeline)
         * connection).hgetAll(getHashKey(entityMetadata.getTableName(),
         * rowKey)); if (connection != null) { ((Pipeline) connection).sync(); }
         * for (String field : fields.get().keySet()) { ((Pipeline)
         * connection).hdel(getHashKey(entityMetadata.getTableName(), rowKey),
         * field); } }
         */
    }
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() + ")");
            }
        }
    }
694538
def _dispose(self):
        """"""
        self.close()
        # _DBProxy.dispose doesn't actually call dispose on the pool
        conn_params = self.get_connection_params()
        key = db_pool._serialize(**conn_params)
        try:
            pool = db_pool.pools[key]
        except KeyError:
            pass
        else:
            pool.dispose()
            del db_pool.pools[key]
984936
def connection
      connection_acquired = false
      begin
        pool.with do |conn|
          connection_acquired = true
          yield(conn)
        end
      rescue Timeout::Error, ConnectionPool::PoolShuttingDownError => e
        if e.kind_of?(ConnectionPool::PoolShuttingDownError)
          @pool = nil
          Connection::Manager.delete_pool(self)
          raise Errors::PoolTimeout.new(e)
        end
        raise connection_acquired ? e : Errors::PoolTimeout.new(e)
      end
    end