public synchronized void flush(int count) {
   Iterator<T> iterator = tuples.iterator();
   while (count-- > 0 && iterator.hasNext()) {
     super.emit(iterator.next());
     iterator.remove();
   }
 }
    @Override
    public void emitTuples() {
      try {
        Thread.sleep(500);
      } catch (InterruptedException ex) {
        logger.debug("interrupted!", ex);
      }

      output.emit(++count);
    }
 @Override
 protected void emit(String tuple) {
   output.emit(tuple);
 }