protected void addToPortMap(IOFSwitch sw,long mac,short vlan,short portVal){
  Map<MacVlanPair,Short> swMap=macVlanToSwitchPortMap.get(sw);
  if (vlan == (short)0xffff) {
    vlan=0;
  }
  if (swMap == null) {
    swMap=Collections.synchronizedMap(new LRULinkedHashMap<MacVlanPair,Short>(MAX_MACS_PER_SWITCH));
    macVlanToSwitchPortMap.put(sw,swMap);
  }
  swMap.put(new MacVlanPair(mac,vlan),portVal);
}

protected void addToPortMap ( IOFSwitch sw , long mac , short vlan , short portVal ) { Map < MacVlanPair , Short > swMap = macVlanToSwitchPortMap . get ( sw ) ; if ( vlan == ( short ) 0xffff ) { vlan = 0 ; } if ( swMap == null ) { swMap = Collections . synchronizedMap ( new LRULinkedHashMap < MacVlanPair , Short > ( MAX_MACS_PER_SWITCH ) ) ; macVlanToSwitchPortMap . put ( sw , swMap ) ; } swMap . put ( new MacVlanPair ( mac , vlan ) , portVal ) ; }
adds a host to the mac / vlan - > switchport mapping
