code: private void onFlushBatch(Map<String, BulkWriteOperation> bulkWriteOperationMap)
      {
          if (!bulkWriteOperationMap.isEmpty())
          {
              for (BulkWriteOperation builder : bulkWriteOperationMap.values())
              {
                  try
                  {
                      builder.execute(getWriteConcern());
                  }
                  catch (BulkWriteException bwex)
                  {
                      log.error("Batch insertion is not performed due to error in write command. Caused By: ", bwex);
                      throw new KunderaException(
                              "Batch insertion is not performed due to error in write command. Caused By: ", bwex);
                  }
                  catch (MongoException mex)
                  {
                      log.error("Batch insertion is not performed. Caused By: ", mex);
                      throw new KunderaException("Batch insertion is not performed. Caused By: ", mex);
                  }
              }
          }
      }
docs: On flush batch.
  
  @param bulkWriteOperationMap
  the bulk write operation map