question: 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 ; }
target:  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.