protected boolean updateAttachmentPoint(){
  boolean moved=false;
  this.oldAPs=attachmentPoints;
  if (attachmentPoints == null || attachmentPoints.isEmpty()) {
    return false;
  }
  List<AttachmentPoint> apList=new ArrayList<AttachmentPoint>();
  if (attachmentPoints != null) {
    apList.addAll(attachmentPoints);
  }
  Map<DatapathId,AttachmentPoint> newMap=getAPMap(apList);
  if (newMap == null || newMap.size() != apList.size()) {
    moved=true;
  }
  if (moved) {
    log.info("updateAttachmentPoint: ap {}  newmap {} ",attachmentPoints,newMap);
    List<AttachmentPoint> newAPList=new ArrayList<AttachmentPoint>();
    if (newMap != null) {
      newAPList.addAll(newMap.values());
    }
    this.attachmentPoints=newAPList;
  }
  return moved;
}

protected boolean updateAttachmentPoint ( ) { boolean moved = false ; this . oldAPs = attachmentPoints ; if ( attachmentPoints == null || attachmentPoints . isEmpty ( ) ) { return false ; } List < AttachmentPoint > apList = new ArrayList < AttachmentPoint > ( ) ; if ( attachmentPoints != null ) { apList . addAll ( attachmentPoints ) ; } Map < DatapathId , AttachmentPoint > newMap = getAPMap ( apList ) ; if ( newMap == null || newMap . size ( ) != apList . size ( ) ) { moved = true ; } if ( moved ) { log . info ( "updateAttachmentPoint: ap {}  newmap {} " , attachmentPoints , newMap ) ; List < AttachmentPoint > newAPList = new ArrayList < AttachmentPoint > ( ) ; if ( newMap != null ) { newAPList . addAll ( newMap . values ( ) ) ; } this . attachmentPoints = newAPList ; } return moved ; }
update the known attachment points . this method is called whenever topology changes . the method returns true if there ' s any change to the list of attachment points - - which indicates a possible device move .
