public void flush(){
  if (batch.size() > 0) {
    submitBatch(batch);
    batch.clear();
  }
}

public void flush ( ) { if ( batch . size ( ) > 0 ) { submitBatch ( batch ) ; batch . clear ( ) ; } }
load any remaining batches in the queue .
