public synchronized void waitForFlush() throws InterruptedException {
      while (!flushed && !isFlusherTerminated() && !isStoppingFlusher()) {
        wait(333);
      }
    }
Return true if a non-zero value is found and the decrement was done.
geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java