Method invoked when flushing the buffer
970729
@Override
    public void run(final Iterable<Object[]> buffer) throws Exception {

        try (UpdateableDatastoreConnection con = datastore.openConnection()) {
            final Column[] whereColumns =
                    con.getSchemaNavigator().convertToColumns(schemaName, tableName, conditionColumnNames);
            final UpdateableDataContext dc = con.getUpdateableDataContext();
            dc.executeUpdate((BatchUpdateScript) callback -> {
                int deleteCount = 0;
                for (final Object[] rowData : buffer) {
                    RowDeletionBuilder deletionBuilder = callback.deleteFrom(tableName);

                    for (int i = 0; i < whereColumns.length; i++) {
                        final Object value = rowData[i];
                        final Column whereColumn = whereColumns[i];
                        final FilterItem filterItem =
                                new FilterItem(new SelectItem(whereColumn), OperatorType.EQUALS_TO, value);

                        deletionBuilder = deletionBuilder.where(filterItem);
                    }

                    if (logger.isDebugEnabled()) {
                        logger.debug("Updating: {}", Arrays.toString(rowData));
                    }

                    try {
                        deletionBuilder.execute();
                        deleteCount++;
                        _updatedRowCount.incrementAndGet();
                    } catch (final RuntimeException e) {
                        errorOccurred(rowData, e);
                    }
                }

                if (deleteCount > 0) {
                    _componentContext.publishMessage(new ExecutionLogMessage(deleteCount + " deletes executed"));
                }
            });
        }
    }
512624
private void flushEventBuffer() {
        Holder<T> holder = buffer.get();
        logger.accept(holder.getBuffer().get());
        holder.clear();
    }
284935
public void flush() {
    lock.writeLock().lock();
    try {
      OMMapBufferEntry entry;
      for (Iterator<OMMapBufferEntry> it = bufferPoolLRU.iterator(); it.hasNext();) {
        entry = it.next();
        if (entry.file != null && entry.file.isClosed()) {
          if (removeEntry(entry))
            it.remove();
        }
      }
    } finally {
      lock.writeLock().unlock();
    }
  }
1337794
def _flushBuffer(self, request):
        ''''''
        assert request is self.requestSession.request
        self.requestSession.writeData(self.buffer)
        self.buffer = []
618410
public final void flush() {
        int totalBytes = 0;
        int amountToPoll = outgoingPackets.size();
        
        Packet packet;

        boolean shouldEncrypt = encryption != null;
        
        var queue = new ArrayDeque<byte[]>();

        while (amountToPoll-- > 0 && (packet = outgoingPackets.poll()) != null) {
            int currentBytes = totalBytes;

            boolean tooBig = (totalBytes += packet.getSize(this)) >= bufferSize;
            boolean empty = outgoingPackets.isEmpty();

            if (!tooBig || empty) {
                queue.addAll(packet.getQueue());
            }

            // If we've buffered all of the packets that we can, send them off.
            if (tooBig || empty) {
                var raw = DIRECT_BUFFER_POOL.take(empty ? totalBytes : currentBytes);
                
                byte[] input;
                
                try {
                    while ((input = queue.pollFirst()) != null) {
                        raw.put(shouldEncrypt ? encryption.doFinal(input) : input);
                    }
                } catch (Exception e) {
                    throw new IllegalStateException("An exception occurred whilst encrypting data:", e);
                }
                
                raw.flip();
                
                queue.addAll(packet.getQueue());
                
                // It is important to synchronize on the packetsToFlush here, as we don't want the callback to
                // complete before the packet is queued.
                synchronized (packetsToFlush) {
                    if (!writing.getAndSet(true)) {
                        channel.write(raw, new Tuple<>(this, raw), PACKET_HANDLER);
                    } else {
                        packetsToFlush.offerFirst(raw);
                    }
                }

                totalBytes = packet.getSize(this);
            }
        }
    }
1059051
public void flush()
  {
    int level = getLevel().intValue();
    
    for (int i = 0; i < _handlers.length; i++) {
      Handler handler = _handlers[i];

      if (level <= handler.getLevel().intValue())
        handler.flush();
    }
  }
1104868
private boolean performFlushIfRequired() throws IOException {
        if (anyAreSet(state, FLUSHING_BUFFER)) {
            final ByteBuffer[] bufs = new ByteBuffer[additionalBuffer == null ? 1 : 2];
            long totalLength = 0;
            bufs[0] = currentBuffer.getBuffer();
            totalLength += bufs[0].remaining();
            if (additionalBuffer != null) {
                bufs[1] = additionalBuffer;
                totalLength += bufs[1].remaining();
            }
            if (totalLength > 0) {
                long total = 0;
                long res = 0;
                do {
                    res = next.write(bufs, 0, bufs.length);
                    total += res;
                    if (res == 0) {
                        return false;
                    }
                } while (total < totalLength);
            }
            additionalBuffer = null;
            currentBuffer.getBuffer().clear();
            state = state & ~FLUSHING_BUFFER;
        }
        return true;
    }
378281
private synchronized void flushData() {
        BufferedWriter writer = null;
        try {
            writer = new BufferedWriter(new FileWriter(new File(this.inputPath)));
            for(String key: this.metadataMap.keySet()) {
                writer.write(NEW_PROPERTY_SEPARATOR + key.toString() + "]" + NEW_LINE);
                writer.write(this.metadataMap.get(key).toString());
                writer.write("" + NEW_LINE + "" + NEW_LINE);
            }
            writer.flush();
        } catch(IOException e) {
            logger.error("IO exception while flushing data to file backed storage: "
                         + e.getMessage());
        }

        try {
            if(writer != null)
                writer.close();
        } catch(Exception e) {
            logger.error("Error while flushing data to file backed storage: " + e.getMessage());
        }
    }
696212
def flush(self):
        """"""
        if self._wbuf:
            buffer = ''.join(self._wbuf)
            self._wbuf = []
            self.write(buffer)
1287274
public void flush() {
        if (annotationsBlocked()) return;
        if (isFlushing()) return;

        startFlushing();
        try {
            while (q.nonEmpty()) {
                q.next().run();
            }
            while (typesQ.nonEmpty()) {
                typesQ.next().run();
            }
            while (afterTypesQ.nonEmpty()) {
                afterTypesQ.next().run();
            }
            while (validateQ.nonEmpty()) {
                validateQ.next().run();
            }
        } finally {
            doneFlushing();
        }
    }
264544
def _flush(self, buffer):
        
        with _handle_oss_error():
            self._bucket.put_object(key=self._key, data=buffer.tobytes())
520367
private void flushBuffer(byte[] append, int ofs, int len) throws IOException {
        int count;

        count = pos + len;
        if (count > 0) {
            dest.writeAsciiLn(Integer.toHexString(count));
            dest.write(buffer, 0, pos);
            dest.write(append, ofs, len);
            dest.writeAsciiLn();
            pos = 0;
        }
    }
595695
def flush(self):
        """"""
        self._buffer += self._decoder.decode(b"", final=True)
        if self._buffer:
            if self._print:
                print(self._buffer)
            if self._callback:
                self._callback(self._buffer)
        self._buffer = ""
492466
private function flushBuffer(): void
    {
        if (null !== $this->passthruLevel) {
            $level = $this->passthruLevel;
            $this->buffer = array_filter($this->buffer, function ($record) use ($level) {
                return $record['level'] >= $level;
            });
            if (count($this->buffer) > 0) {
                $this->handler->handleBatch($this->buffer);
            }
        }

        $this->buffer = [];
        $this->buffering = true;
    }
345072
function flush(writeTo) {
    var outputTo = bufferLen + matchStart - chunkLength;

    while (outputTo > 0 && outputTo > bufferStart) {
      if (outputTo > buffer[0].length-1) {
        var part = buffer.shift();
        outputBuffer.push(part.slice(bufferStart));

        bufferStart = Math.max(0, bufferStart - part.length);
        bufferLen -= part.length;
        outputTo -= part.length;
      } else {
        outputBuffer.push(buffer[0].slice(bufferStart, outputTo));
        bufferStart = outputTo;
        break;
      }
    }
    if (writeTo) {
      // Output everything ready as one chunk
      writeTo.push(outputBuffer.join(''));
      outputBuffer.length = 0;
    }
  }
173688
public void flushPendingSessionEvents() throws Exception {
        synchronized (sessionEventsQueue) {
            IoSessionEvent evt;
            
            while ((evt = sessionEventsQueue.poll()) != null) {
                logger.debug(" Flushing buffered event: {}", evt);    
                evt.deliverEvent();
            }
        }
    }
1185854
protected void flushData()
    {
        try
        {
            out.write(buffer, 0, validBufferBytes);
            lastFlushOffset += validBufferBytes;
        }
        catch (IOException e)
        {
            throw new FSWriteError(e, getPath());
        }
        if (runPostFlush != null)
            runPostFlush.run();
    }