Abort any ongoing transfers and clear all buffers
422267
def _abort_all_transfers(self, exception):
        
        pending_reads = len(self._commands_to_read)
        # invalidate _transfer_list
        for transfer in self._transfer_list:
            transfer.add_error(exception)
        # clear all deferred buffers
        self._init_deferred_buffers()
        # finish all pending reads and ignore the data
        # Only do this if the error is a tranfer error.
        # Otherwise this could cause another exception
        if isinstance(exception, DAPAccessIntf.TransferError):
            for _ in range(pending_reads):
                self._interface.read()
1110436
def flush(flush = Zlib::SYNC_FLUSH)
      run '', flush unless flush == Zlib::NO_FLUSH

      detatch_output
    end
659133
def skip_all(self):
        """"""

        storage, streaming = self.engine.count()

        if self.selector.output:
            self.offset = streaming
        else:
            self.offset = storage

        self._count = 0
205894
function () {
        // just to be sure! clear all items in the connections object. they should be cleared by now
        util.each(this.connections, function (value, prop, conns) {
            try {
                value.release();
            }
            catch (e) { } // nothing to do with error
            delete conns[prop];
        });

        // now execute end on the databases. will end pool if pool, or otherwise will execute whatever
        // `end` that has been exposed by db.js
        util.each(Transaction.databases, function (value, prop, databases) {
            value.end();
            databases[prop] = null;
        });
    }
353046
def _flush(self):
        """"""
        self._buffer.sort()
        self._replace_batch()
        self._buffer = []
        self._compress()
227720
private static function _stop()
  {
    $adapter = self::$_transaction->_stored;
    
    if (is_null($adapter)) {
      Config::clearDataAdapter();
    } else {
      Config::setDataAdapter($adapter);
    }
  }
640443
def flush_all(self, conn):
        """"""
        command = b'flush_all\r\n'
        response = yield from self._execute_simple_command(
            conn, command)

        if const.OK != response:
            raise ClientException('Memcached flush_all failed', response)
190325
def _abort_upload(self):
        
        try:
            self._api.delete(
                self._URL['upload_info'].format(upload_id=self._upload_id)
            )
        except SbgError as e:
            self._status = TransferState.FAILED
            raise SbgError(
                'Failed to abort upload! Reason: {}'.format(e.message)
            )
1225466
def flush(self, draw_progress=True):
    """"""
    reset_progressbar = None
    if self._draw_progressbar and draw_progress:
      progressbar, reset_progressbar = self._draw_progressbar()
      self._buffer.append(progressbar)

    for line in self._buffer:
      self._outFile.write(line)
    #self._outFile.flush() needed?
    self._buffer = []
    if reset_progressbar:
      # first thing on next flush is to reset the current progressbar
      self._buffer.append(reset_progressbar)
    self._current_ticks = 0
    self._last_flush_time = time()
46560
public void cancel() {
      if (runnableFuture != null && !runnableFuture.isCancelled()) {
         log.debugf("Cancelling outbound transfer to node %s, segments %s", destination, segments);
         runnableFuture.cancel(true);
      }
   }
834807
def flush(self):
        
        for elem in self:
            if elem.id[0] != scoop.worker:
                elem._delete()
            self.socket.sendFuture(elem)
        self.ready.clear()
        self.movable.clear()
375094
def terminate(self):
        """"""
        self._backend_client.clear()
        self._needs_save = False
        self._started = False
        self._expire_cookie = True
        self._send_cookie = True
459179
public void cancel() {
      if (!isCancelled) {
         isCancelled = true;

         IntSet segmentsCopy = getUnfinishedSegments();
         synchronized (segments) {
            unfinishedSegments.clear();
         }
         if (trace) {
            log.tracef("Cancelling inbound state transfer from %s with unfinished segments %s", source, segmentsCopy);
         }

         sendCancelCommand(segmentsCopy);

         notifyCompletion(false);
      }
   }
1203632
private void flushBuffer() {
		// Do the actual logging:
		removes.ensureCapacity(buffer.size());
		for(Iterator<LoggingEvent> i = buffer.iterator(); i.hasNext();) {
			try {
				LoggingEvent event = (LoggingEvent)i.next();
				doLog(event);
				removes.add(event);
			} catch(Exception e) {
				errorHandler.error("Failed to flush log", e, ErrorCode.FLUSH_FAILURE);
			}
		}

		// Remove from the buffer any events that were reported:
		buffer.removeAll(removes);

		// Clear the buffer of reported events:
		removes.clear();
	}
1217101
def flush(self):
        
        for key in self.grouping_info.keys():
            if self._should_flush(key):
                self._write_current_buffer_for_group_key(key)
1119915
def stop(self):
        
        self.stopping = True
        # Cancel any outstanding request to our client
        if self._batch_send_d:
            self._batch_send_d.cancel()
        # Do we have to worry about our looping call?
        if self.batch_every_t is not None:
            # Stop our looping call, and wait for the deferred to be called
            if self._sendLooper is not None:
                self._sendLooper.stop()
        # Make sure requests that wasn't cancelled above are now
        self._cancel_outstanding()
        return self._sendLooperD or succeed(None)
195043
public void cancel() {
        try {
            // FileOutputStream is also closed cascadingly
            if (outStream != null) {
                outStream.close();
                outStream = null;
            }
            // Clear encryptor:
            encryptor = null;
        } catch (IOException e) {
            Log.w(Log.TAG_BLOB_STORE, "Exception closing buffered output stream", e);
        }
        tempFile.delete();
    }