Sync up low water marks to high water marks for all the sources.

@return <tt>true</tt> if flush is successful.
439387
public boolean syncWaterMarks() {
        // Sync up low water marks
        for (String source : sourceWaterMarkMap.keySet()) {
            WaterMarkEntry wmEntry = sourceWaterMarkMap.get(source);
            wmEntry.setLWMScn(wmEntry.getHWMScn());
        }
        
        return flush();
    }
1339942
public final void flushTo(ConcurrentGlobalContainer globalContainer) {
      if (trace) {
         log.tracef("Flush this [%s] to %s", this, globalContainer);
      }
      container.mergeTo(globalContainer);
   }
492832
private synchronized void checkFlush()
   {
      // avoid frequent flushes during reindexing;
      long idleTime = online.get() ? System.currentTimeMillis() - lastFlushTime : 0;
      long volatileTime = System.currentTimeMillis() - lastFileSystemFlushTime;
      // do not flush if volatileIdleTime is zero or negative
      if ((handler.getVolatileIdleTime() > 0 && idleTime > handler.getVolatileIdleTime() * 1000)
         || (handler.getMaxVolatileTime() > 0 && volatileTime > handler.getMaxVolatileTime() * 1000))
      {
         try
         {
            if (redoLog.hasEntries())
            {
               LOG.debug("Flushing index after being idle for " + idleTime + " ms.");
               synchronized (updateMonitor)
               {
                  //updateInProgress = true;
                  indexUpdateMonitor.setUpdateInProgress(true, true);
               }
               try
               {
                  flush();
               }
               finally
               {
                  synchronized (updateMonitor)
                  {
                     //updateInProgress = false;
                     indexUpdateMonitor.setUpdateInProgress(false, true);
                     updateMonitor.notifyAll();
                     releaseMultiReader();
                  }
               }
            }
         }
         catch (IOException e)
         {
            LOG.error("Unable to commit volatile index", e);
         }
      }
   }
1197564
def __flush(self):
        """"""
        if self.__args is None or self.__disconnecting:
            return False
        #self.emit(self.signal, *self.args)
        self.__sigDelayed.emit(self.__args)
        self.__args = None
        self.__timer.stop()
        self.__lastFlushTime = time.time()
        return True
1110281
boolean flush() {
    if (!dirty)
      return true;

    acquireExclusiveLock();
    try {

      final long timer = OProfiler.getInstance().startChrono();

      // FORCE THE WRITE OF THE BUFFER
      for (int i = 0; i < FORCE_RETRY; ++i) {
        try {
          buffer.force();
          dirty = false;
          break;
        } catch (Exception e) {
          OLogManager.instance().debug(this,
              "Cannot write memory buffer to disk. Retrying (" + (i + 1) + "/" + FORCE_RETRY + ")...");
          OMemoryWatchDog.freeMemory(FORCE_DELAY);
        }
      }

      if (dirty)
        OLogManager.instance().debug(this, "Cannot commit memory buffer to disk after %d retries", FORCE_RETRY);
      else
        OProfiler.getInstance().updateCounter("system.file.mmap.pagesCommitted", 1);

      OProfiler.getInstance().stopChrono("system.file.mmap.commitPages", timer);

      return !dirty;

    } finally {
      releaseExclusiveLock();
    }
  }
661593
public CheckRequest[] flush() {
    if (cache == null) {
      return NO_REQUESTS;
    }

    // Thread safety - the current thread cleans up the cache, which may add multiple cached
    // aggregated operations to the output deque.
    synchronized (cache) {
      cache.cleanUp();
      ArrayList<CheckRequest> reqs = Lists.newArrayList();
      for (CachedItem item : out) {
        CheckRequest req = item.extractRequest();
        if (req != null) {
          reqs.add(req);
        }
      }
      out.clear();
      return reqs.toArray(new CheckRequest[reqs.size()]);
    }
  }
399339
def flush(self):
        
        self.acquire()
        try:
            if self.outStream and hasattr(self.outStream, "flush"):
                self.outStream.flush()
            if self.errStream and hasattr(self.errStream, "flush"):
                self.errStream.flush()
        finally:
            self.release()
727194
def flush(self):
        
        self._write_all(self._wbuffer.getvalue())
        self._wbuffer = BytesIO()
        return
656964
public boolean flushall() {
        String result = "";
        Jedis jedis = null;
        try {
            jedis = this.jedisPool.getResource();
            result = jedis.flushAll();
            logger.info("redis client name: " + this.getCacheName() + " flushall.");

        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            this.jedisPool.returnBrokenResource(jedis);
        } finally {
            if (jedis != null) {
                this.jedisPool.returnResource(jedis);
            }
        }
        return "OK".equalsIgnoreCase(result);
    }
272921
public boolean flush() {
        boolean ret = true;
        PrintWriter out = null;
        
        // Save source water marks
        try {
            // Backup the original file
            if (file.exists()) {
                if (fileOriginal.exists()) {
                    fileOriginal.delete();
                }

                file.renameTo(fileOriginal);
            }

            // Overwrite the existing file
            out = new PrintWriter(new FileOutputStream(file));
            for (String source : sourceWaterMarkMap.keySet()) {
                WaterMarkEntry wmEntry = sourceWaterMarkMap.get(source);
                out.println(wmEntry);
            }
            out.flush();
        } catch (IOException ioe) {
            logger.error("Failed to flush water marks", ioe);
            ret = false;
        } finally {
            if (out != null) {
                out.close();
                out = null;
            }
        }

        return ret;
    }
758481
private void flush(boolean isEnd)
  {
    if (_startOffset == _offset && _bufferSize == 0) {
      if (! isCommitted() || isEnd) {
        flush(null, isEnd);
        _startOffset = bufferStart();
        _offset = _startOffset;
      }
      return;
    }

    int sublen = _offset - _startOffset;
    _tBuf.length(_offset);
    _contentLength += _offset - _startOffset;
    _bufferSize = 0;
    
    if (_startOffset > 0) {
      fillChunkHeader(_tBuf, sublen);
    }
    
    flush(_tBuf, isEnd);

    if (! isEnd) {
      _tBuf = TempBuffer.create();
    
      _startOffset = bufferStart();
      _offset = _startOffset;

      _tBuf.length(_offset);
      
      _buffer = _tBuf.buffer();
    }
    else {
      _tBuf = null;
    }
  }
944696
public synchronized void flush() throws IOException {
        if (sink != null) {
            if (sink.closedByReader || closed) {
                throw new IOException("Pipe closed");
            }
            synchronized (sink) {
                sink.notifyAll();
            }
        }
    }
3123
@Override
	protected void flush() {
		// The Kafka 0.8 producer doesn't support flushing, we wait here
		// until all pending records are confirmed
		synchronized (pendingRecordsLock) {
			while (pendingRecords > 0) {
				try {
					pendingRecordsLock.wait();
				} catch (InterruptedException e) {
					// this can be interrupted when the Task has been cancelled.
					// by throwing an exception, we ensure that this checkpoint doesn't get confirmed
					throw new RuntimeException("Flushing got interrupted while checkpointing", e);
				}
			}
		}
	}
375490
public final void flush() throws IOException
    {
        if (! _closed)
        {
            if (atDatagramLevel() && ! hasAnnotations())
            {
                SymbolTable symtab = getSymbolTable();

                if (symtab != null &&
                    symtab.isReadOnly() &&
                    symtab.isLocalTable())
                {
                    // It's no longer possible to add more symbols to the local
                    // symtab, so we can safely write everything out.
                    writeAllBufferedData();
                }
            }

            _user_output_stream.flush();
        }
    }
938126
def flush_synced(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.flush_synced(index=self._name, **kwargs)
868503
public final void tryFlushAll() {
      if (flushing.compareAndSet(false, true)) {
         if (reset) {
            for (Stat stat : Stat.values()) {
               topKeyWrapper.get(stat).reset(this, capacity);
            }
            reset = false;
         } else {
            for (Stat stat : Stat.values()) {
               topKeyWrapper.get(stat).flush();
            }
         }
         flushing.set(false);
      }
   }
6213
@Override
  public void flush(boolean forceSync)
      throws IOException {
    if (blockDataWriter != null) {
      blockDataWriter.flush();
      if (forceSync) {
        blockDataWriter.force(true);
      }
    }
  }