Flush defer logs
14374
public function flush()
    {
        //todo bugfix batch record
        foreach ($this->deferLogs as $k => $deferLog) {
            $this->record($deferLog['message'], $deferLog['context'], $deferLog['level'], $deferLog['role']);
            $this->removeDeferLog($k);
        }
    }
846954
def flush(self):
        """"""
        writer = self.writer
        if writer is None:
            raise GaugedUseAfterFreeError
        self.flush_writer_position()
        keys = self.translate_keys()
        blocks = []
        current_block = self.current_block
        statistics = self.statistics
        driver = self.driver
        flags = 0  # for future extensions, e.g. block compression
        for namespace, key, block in self.pending_blocks():
            length = block.byte_length()
            if not length:
                continue
            key_id = keys[(namespace, key)]
            statistics[namespace].byte_count += length
            blocks.append((namespace, current_block, key_id, block.buffer(),
                           flags))
        if self.config.overwrite_blocks:
            driver.replace_blocks(blocks)
        else:
            driver.insert_or_append_blocks(blocks)
            if not Gauged.writer_flush_maps(writer, True):
                raise MemoryError
        update_namespace = driver.add_namespace_statistics
        for namespace, stats in statistics.iteritems():
            update_namespace(namespace, self.current_block,
                             stats.data_points, stats.byte_count)
        statistics.clear()
        driver.commit()
        self.flush_now = False
487885
def flush(self):
        

        done = threading.Event()

        def _callback():
            done.set()

        self.defer(_callback)
        done.wait()
594691
public static void flushSilently(Flushable flushable) {
    try {
      if(flushable != null) {
        flushable.flush();
      }
    }
    catch(IOException ignore) {
      LOG.debugCloseException(ignore);
    }
  }
432866
void flushAll() {
		for (Buffer buff : bufferPool) {
			try {
				buff.getExternalLock().lock();
				buff.flush();
			} finally {
				buff.getExternalLock().unlock();
			}
		}
	}
442504
protected function flushLogQueue()
    {
        if ($this->logReady() && !empty($this->logQueue)) {
            foreach ($this->logQueue as $entry) {
                $this->getLog()->log($entry['message'], $entry['priority']);
            }
            $this->logQueue = [];
        }
    }
809034
def flush(self):
        """"""
        keys = self.client.smembers(self.keys_container)
        for key in keys:
            self.delete_entry(key)
965072
def flush_all(self, time=0):
        
        returns = []
        for server in self.servers:
            returns.append(server.flush_all(time))

        return any(returns)
500003
function flushQueueIfAvailable()
    {
        if (!isLogAvailable())
            return;

        clearInterval(WebInspector.log.interval);
        delete WebInspector.log.interval;

        flushQueue();
    }
1202415
def flush(self):
        """"""
        now = time.time()
        to_remove = []
        for k, entry in self.pool.items():
            if entry.timestamp < now:
                entry.client.close()
                to_remove.append(k)
        for k in to_remove:
            del self.pool[k]
577697
def flush(self, auth, resource, options=None, defer=False):
        
        args = [resource]
        if options is not None:
            args.append(options)
        return self._call('flush', auth, args, defer)
1017779
public void flush() {
        logger.info(String.format("(%s) Flush, buffer size: %d", detectorImpl.getName(), queue.size()));
        while(queue.size()>0)
            detectorImpl.fireEvent(queue.poll());
    }
23338
def flush(self):
        
        if self._requests_middleware:
            self._requests_middleware.flush()

        if self._trace_log_handler:
            self._trace_log_handler.flush()

        if self._exception_telemetry_client:
            self._exception_telemetry_client.flush()
698569
private synchronized void setFlush(boolean immediateFlush) {
    try {
      Set<FileAppender> flushedFileAppenders = new HashSet<FileAppender>();
      Enumeration<?> currentLoggers = LogManager.getLoggerRepository()
          .getCurrentLoggers();
      while (currentLoggers.hasMoreElements()) {
        Object nextLogger = currentLoggers.nextElement();
        if (nextLogger instanceof Logger) {
          Logger currentLogger = (Logger) nextLogger;
          Enumeration<?> allAppenders = currentLogger.getParent()
              .getAllAppenders();
          while (allAppenders.hasMoreElements()) {
            Object nextElement = allAppenders.nextElement();
            if (nextElement instanceof FileAppender) {
              FileAppender fileAppender = (FileAppender) nextElement;

              if (!flushedFileAppenders.contains(fileAppender)) {
                flushedFileAppenders.add(fileAppender);
                fileAppender.setImmediateFlush(immediateFlush);
              }
            }
          }
        }
      }
    } catch (Throwable e) {
      LOG.error("Failed flushing logs", e);
    }
  }
1136164
function flush () {
  return storage.keys().then(keys => {
    return storage.remove(
      keys.filter(key => key.indexOf(prefix) === 0 || key.indexOf(expire) === 0)
    )
  })
}
201762
function flush () {
  let start
  functionalIds.clear()
  captureIds.clear()
  if (process.env.NODE_ENV !== 'production') {
    captureCount = 0
    start = isBrowser ? window.performance.now() : 0
  }
  const payload = stringify({
    inspectedInstance: getInstanceDetails(currentInspectedId),
    instances: findQualifiedChildrenFromList(rootInstances)
  })
  if (process.env.NODE_ENV !== 'production') {
    console.log(`[flush] serialized ${captureCount} instances${isBrowser ? `, took ${window.performance.now() - start}ms.` : ''}.`)
  }
  bridge.send('flush', payload)
}
355306
def force_flush(
            self):
        
        self.debug_log('force flush requested')
        self.perform_work(
            self.queue,
            self.shutdown_event,
            self.shutdown_ack,
            self.already_done)