Deletes all states in multiple flows and dequeues all client messages.
329336
def MultiDestroyFlowStates(self, session_ids):
    """"""
    deleted_requests = self.data_store.MultiDestroyFlowStates(
        session_ids, request_limit=self.request_limit)

    for request in deleted_requests:
      if request.HasField("request"):
        # Client request dequeueing is cached so we can call it directly.
        self.DeQueueClientRequest(request.request)
1198257
def clear(self):
        '''
        
        '''
        self.redis_conn.delete(self.window_key)
        self.redis_conn.delete(self.moderate_key)
        self.queue.clear()
124373
def clean_previous_run(self):
        
        # Execute the base class treatment...
        super(Alignak, self).clean_previous_run()

        # Clean all lists
        self.pollers.clear()
        self.reactionners.clear()
        self.brokers.clear()
1000039
public static void killAll()
  {
    Collection<TaskQueue> taskQueues = new ArrayList<TaskQueue>( QUEUE_MAP.values() );
    for( TaskQueue taskQueue : taskQueues )
    {
      emptyAndRemoveQueue( taskQueue.getName() );
    }
  }
772332
public void purgeCache() {
        synchronized (users) {
            users.values().stream()
                    .map(Reference::get)
                    .filter(Objects::nonNull)
                    .map(Cleanupable.class::cast)
                    .forEach(Cleanupable::cleanup);
            users.clear();
        }
        userIdByRef.clear();
        servers.values().stream()
                .map(Cleanupable.class::cast)
                .forEach(Cleanupable::cleanup);
        servers.clear();
        channels.values().stream()
                .filter(Cleanupable.class::isInstance)
                .map(Cleanupable.class::cast)
                .forEach(Cleanupable::cleanup);
        channels.clear();
        unavailableServers.clear();
        customEmojis.clear();
        messages.clear();
        messageIdByRef.clear();
        timeOffset = null;
    }
1375008
def MultiDestroyFlowStates(self, session_ids, request_limit=None):
    

    subjects = [session_id.Add("state") for session_id in session_ids]
    to_delete = []
    deleted_requests = []

    for subject, values in self.MultiResolvePrefix(
        subjects, self.FLOW_REQUEST_PREFIX, limit=request_limit):
      for _, serialized, _ in values:

        request = rdf_flow_runner.RequestState.FromSerializedString(serialized)
        deleted_requests.append(request)

        # Drop all responses to this request.
        response_subject = self.GetFlowResponseSubject(request.session_id,
                                                       request.id)
        to_delete.append(response_subject)

      # Mark the request itself for deletion.
      to_delete.append(subject)

    # Drop them all at once.
    self.DeleteSubjects(to_delete, sync=True)
    return deleted_requests
774520
def flush_all(self):
        
        for queue_name in chain(self.queues, self.delay_queues):
            self.flush(queue_name)
619123
protected void removeCleanupAndDestroyAllFreeConnections() { // removed iterator code
        // This method is called within a synchronize block
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(this, tc, "removeCleanupAndDestroyAllFreeConnections");
        }
        int mcWrapperListIndex = mcWrapperList.size() - 1;
        for (int i = mcWrapperListIndex; i >= 0; --i) {
            MCWrapper mcw = (MCWrapper) mcWrapperList.remove(i);
            mcw.setPoolState(0);
            --numberOfConnectionsAssignedToThisFreePool;
            cleanupAndDestroyMCWrapper(mcw);
            pm.totalConnectionCount.decrementAndGet();
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(this, tc, "removeCleanupAndDestroyAllFreeConnections");
        }
    }
57354
public void clearRecycle()
  {
    ArrayList<ClientSocket> recycleList = null;

    synchronized (this) {
      _idleHead = _idleTail = 0;

      for (int i = 0; i < _idle.length; i++) {
        ClientSocket stream;

        stream = _idle[i];
        _idle[i] = null;

        if (stream != null) {
          if (recycleList == null)
            recycleList = new ArrayList<ClientSocket>();

          recycleList.add(stream);
        }
      }
    }

    if (recycleList != null) {
      for (ClientSocket stream : recycleList) {
        stream.closeImpl();
      }
    }
  }
785030
def pop_all_queues(self):
        
        output = []
        with self.lock:
            for q in self.queue:
                output.extend(list(q.queue))
                q.queue.clear()

        return output
614758
final void clear() {
        reset();
        
        _freeQueue.clear();
        _targetQueue.clear();
        _compactedQueue.clear();
        while(!_updateManager.isServiceQueueEmpty()) {
            CompactionUpdateBatch batch = _updateManager.pollBatch();
            _updateManager.recycleBatch(batch);
        }
    }
52891
def DeleteClientActionRequests(self, requests):
    """"""
    if not requests:
      return

    to_delete = []
    for r in requests:
      to_delete.append((r.client_id, r.flow_id, r.request_id))

    if len(set(to_delete)) != len(to_delete):
      raise ValueError(
          "Received multiple copies of the same message to delete.")

    self._DeleteClientActionRequest(to_delete)
1101091
def clear(self, page_size=10, vtimeout=10):
        """"""
        n = 0
        l = self.get_messages(page_size, vtimeout)
        while l:
            for m in l:
                self.delete_message(m)
                n += 1
            l = self.get_messages(page_size, vtimeout)
        return n
1176056
@CommandArgument
  public void clean() {
    for (int i = 0; i < jobProgressStates.size();) {
      ProgressState state = jobProgressStates.get(i);
      if (state.isCancelled() || state.isComplete()) {
        jobProgressStates.remove(i);
      } else {
        i++;
      }
    }
  }
1004242
public void cleanUp(RESTRequest request) {
        //We need to loop through the clients but we don't want to synchronize
        //the entire map, which would block new clients from entering and block existing 
        //clients from continuing their work.  So we iterate and possibly remove by just
        //using the built-in concurrency of ConcurrentHashMap.
        final Iterator<Entry<Integer, ClientNotificationArea>> clients = inboxes.entrySet().iterator();

        while (clients.hasNext()) {
            Entry<Integer, ClientNotificationArea> client = clients.next();

            //Check for time outs
            ClientNotificationArea inbox = client.getValue();
            if (inbox.timedOut()) {
                //cleanup
                inbox.cleanUp(request);

                //Emit the warning
                Tr.warning(tc, "jmx.connector.server.rest.notification.timeout.warning", client.getKey());

                //remove the client inbox from the map (using the Iterator.remove() method)
                clients.remove();
            }
        }

    }
1365811
private void clearState() {

        if (m_state != null) {
            ParamState state = m_state;
            m_state = null;
            state.undoChanges();
        }
    }
1275467
public void clear() {
    for (final Pair<ExecutionReference, ExecutableFlow> pair : this.queuedFlowMap.values()) {
      dequeue(pair.getFirst().getExecId());
    }
  }