@LogMessageDoc(level="ERROR",message="Tried to write to switch {switch} but got {error}",explanation="An I/O error occured while trying to write a " + "static flow to a switch",recommendation=LogMessageDoc.CHECK_SWITCH) private void writeOFMessagesToSwitch(DatapathId dpid,List<OFMessage> messages){
  IOFSwitch ofswitch=switchService.getSwitch(dpid);
  if (ofswitch != null) {
    if (log.isDebugEnabled()) {
      log.debug("Sending {} new entries to {}",messages.size(),dpid);
    }
    ofswitch.write(messages);
    ofswitch.flush();
  }
}

@ LogMessageDoc ( level = "ERROR" , message = "Tried to write to switch {switch} but got {error}" , explanation = "An I/O error occured while trying to write a " + "static flow to a switch" , recommendation = LogMessageDoc . CHECK_SWITCH ) private void writeOFMessagesToSwitch ( DatapathId dpid , List < OFMessage > messages ) { IOFSwitch ofswitch = switchService . getSwitch ( dpid ) ; if ( ofswitch != null ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Sending {} new entries to {}" , messages . size ( ) , dpid ) ; } ofswitch . write ( messages ) ; ofswitch . flush ( ) ; } }
writes a list of ofmessages to a switch
