code: @Override
      public boolean flushPuts(long waitTime, TimeUnit timeUnit) throws InterruptedException
      {
          long    msWaitRemaining = TimeUnit.MILLISECONDS.convert(waitTime, timeUnit);
          synchronized(putCount)
          {
              while ( putCount.get() > 0 )
              {
                  if ( msWaitRemaining <= 0 )
                  {
                      return false;
                  }
  
                  long        startMs = System.currentTimeMillis();
  
                  putCount.wait(msWaitRemaining);
  
                  long        elapsedMs = System.currentTimeMillis() - startMs;
                  msWaitRemaining -= elapsedMs;
              }
          }
          return true;
      }
docs: Wait until any pending puts are committed
  
  @param waitTime max wait time
  @param timeUnit time unit
  @return true if the flush was successful, false if it timed out first
  @throws InterruptedException if thread was interrupted