code: public ReportRequest[] clear() {
      if (cache == null) {
        return NO_REQUESTS;
      }
      synchronized (cache) {
        ReportRequest[] res = generatedFlushRequests(cache.asMap().values());
        cache.invalidateAll();
        out.clear();
        return res;
      }
    }
docs: Clears this instances cache of aggregated operations.
  
  Is intended to be called by the driver before shutdown.
  
  @return the remaining aggregated {code ReportRequest}s