Disconnect all cached connections.

        @returns: a deferred that fires once all connection are disconnected.
        @rtype: L{Deferred}
771800
def shutdown(self):
        
        self._shuttingDown = {key: Deferred()
                              for key in self.cachedConnections.keys()}
        return DeferredList(
            [maybeDeferred(p.transport.loseConnection)
             for p in self.cachedConnections.values()]
             + self._shuttingDown.values())
716272
def disconnect(self):
        ''''''
        with self._mutex:
            if not self.ports:
                raise exceptions.NotConnectedError
            # Some of the connection participants may not be in the tree,
            # causing the port search in self.ports to return ('Unknown', None)
            # for those participants. Search the list to find the first
            # participant that is in the tree (there must be at least one).
            p = self.ports[0][1]
            ii = 1
            while not p and ii < len(self.ports):
                p = self.ports[ii][1]
                ii += 1
            if not p:
                raise exceptions.UnknownConnectionOwnerError
            p.object.disconnect(self.id)
1332823
def loseConnection(self):
        
        if self._stopped:
            result = self._stopped
        elif self.connected:
            result = defer.Deferred()
            self._stopped = result
            self.transport.write(b'\n'.join((b'-stay_open', b'False', b'')))
        else:
            # Already disconnected.
            result = defer.succeed(self)

        return result
849536
def disconnect():
    
    post_save.disconnect(node_created_handler, sender=Node)
    node_status_changed.disconnect(node_status_changed_handler)
    pre_delete.disconnect(node_deleted_handler, sender=Node)
667629
def disconnect_all(self):
        ''''''
        with self._mutex:
            for conn in self.connections:
                self.object.disconnect(conn.id)
            self.reparse_connections()
1156553
def disconnect(self):
        
        if self.connected:
            self._socket.close()
            self._socket = None
            self.connected = False
404491
def disconnect(self, func=None):
        """"""
        if func is None:
            self._connections = []
        else:
            self._connections.remove(func)
209923
def disconnect(self):
        

        if self.session.transitions.is_connected():
            if not self._disconnect_task.done():
                self._disconnect_task.cancel()
            yield from self._handler.mqtt_disconnect()
            self._connected_state.clear()
            yield from self._handler.stop()
            self.session.transitions.disconnect()
        else:
            self.logger.warning("Client session is not currently connected, ignoring call")
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
            }
        }
    }
1145033
def close(self):
        
        waiters = []
        for p in self.connection_pools.values():
            waiters.append(p.close())
        self.connection_pools.clear()
        return asyncio.gather(*waiters, loop=self._loop)
429319
def disconnect
      if @connection.respond_to?(:actors)
        @connection.actors.each do |connection|
          connection.async.disconnect if connection.alive?
        end
      else
        @connection.async.disconnect if @connection.alive?
      end
    end
553269
def clear_cache(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.clear_cache(index=self._name, **kwargs)
1197990
def disconnect(self):
        
        if not self.is_connected() and not self.is_connecting():
            return
        LOG.debug("disconnecting from %s...", self._redis_server())
        self.__periodic_callback.stop()
        try:
            self._ioloop.remove_handler(self.__socket_fileno)
            self._listened_events = 0
        except Exception:
            pass
        self.__socket_fileno = -1
        try:
            self.__socket.close()
        except Exception:
            pass
        self._state.set_disconnected()
        self._close_callback()
        LOG.debug("disconnected from %s", self._redis_server())
316846
def purge(self, name=None):
        
        self.disconnect(name)

        if name in self._connections:
            del self._connections[name]
1230608
final void deactivateNow() {
      isActive = false;
      stats.deactivate();
      availableQueue.clear();
      reopenExecutor.getQueue().clear();
      for(ConnectionPoolConnection conn : connections) {
         conn.forceRealClose();
         conn.state.set(ConnectionPoolConnection.STATE_DISCONNECTED);
      }
   }
651925
def disconnect(self):
        '''
        
        '''
        if not hasattr(self, '_sock'):
            return

        # TODO: If there are bytes left on the output, queue the close for
        # later.
        self._sock.close_cb = None
        self._sock.close()
582378
def remove_connection(self, interface1, interface2):
        """"""

        uri = "api/interface/disconnect/%s/%s/" % (interface1, interface2)

        return self.delete(uri)