public static List<BaseMqttMessage> processMessageLog(final List<LoggedMqttMessage> list,final ProgressUpdater progress,final long current,final long max){
  final List<BaseMqttMessage> mqttMessageList=new ArrayList<BaseMqttMessage>();
  long item=0;
  for (  final LoggedMqttMessage loggedMessage : list) {
    if (progress != null) {
      if (progress.isCancelled()) {
        logger.info("Task cancelled!");
        return null;
      }
      item++;
      if (item % 1000 == 0) {
        progress.update(current + item,max);
      }
    }
    mqttMessageList.add(convertToBaseMqttMessage(loggedMessage));
  }
  logger.info("Message audit log - processed {} MQTT messages",list.size());
  return mqttMessageList;
}

public static List < BaseMqttMessage > processMessageLog ( final List < LoggedMqttMessage > list , final ProgressUpdater progress , final long current , final long max ) { final List < BaseMqttMessage > mqttMessageList = new ArrayList < BaseMqttMessage > ( ) ; long item = 0 ; for ( final LoggedMqttMessage loggedMessage : list ) { if ( progress != null ) { if ( progress . isCancelled ( ) ) { logger . info ( "Task cancelled!" ) ; return null ; } item ++ ; if ( item % 1000 == 0 ) { progress . update ( current + item , max ) ; } } mqttMessageList . add ( convertToBaseMqttMessage ( loggedMessage ) ) ; } logger . info ( "Message audit log - processed {} MQTT messages" , list . size ( ) ) ; return mqttMessageList ; }
turns the given list of loggedmqttmessages into receivedmqttmessages .
