Handles target un-registration
486617
@MainThread
    private void handleUnRegistration(Object targetObj) {
        if (targetObj == null) {
            throw new NullPointerException("Target cannot be null");
        }

        EventTarget target = null;

        for (Iterator<EventTarget> iterator = targets.iterator(); iterator.hasNext(); ) {
            EventTarget listTarget = iterator.next();
            if (listTarget.targetObj == targetObj) {
                iterator.remove();
                target = listTarget;
                target.targetObj = null;
                break;
            }
        }

        if (target == null) {
            Utils.logE(targetObj, "Was not registered");
        }

        Utils.log(targetObj, "Unregistered");
    }
1294673
def remove_target(self, target_id):
        """"""
        updated_targets = []
        for target in self.my_osid_object_form._my_map['targets']:
            if target['id'] != target_id:
                updated_targets.append(target)
        self.my_osid_object_form._my_map['targets'] = updated_targets
1201940
void cancelAssignDistributionSetEvent(final Target target, final Long actionId) {
        afterCommit.afterCommit(
                () -> eventPublisher.publishEvent(new CancelTargetAssignmentEvent(target, actionId, bus.getId())));
    }
755436
def unregister(self):
        """"""
        uuid = self.metadata["tracker"]["uuid"]
        # connect to server
        result = requests.delete(urljoin(self.tracker, 'models' + "/" + uuid))
        logger.debug("unregistered at server %s with %s: %s", self.tracker, uuid, result)
32825
public void removeTargetHandler( TargetHandler targetItf ) {

		// May happen if a target could not be instantiated
		// (iPojo uses proxies). In this case, it results in a NPE here.
		if( targetItf == null ) {
			this.logger.info( "An invalid target handler is removed." );

		} else {
			synchronized( this.targetHandlers ) {
				this.targetHandlers.remove( targetItf );
			}

			this.logger.info( "Target handler '" + targetItf.getTargetId() + "' is not available anymore in Roboconf's DM." );
		}

		listTargets( this.targetHandlers, this.logger );
	}
857514
public void unregisterTaskManager(InstanceID instanceId, boolean terminated){
		Instance instance = registeredHostsById.get(instanceId);

		if (instance != null){
			registeredHostsById.remove(instance.getId());
			registeredHostsByResource.remove(instance.getTaskManagerID());

			if (terminated) {
				deadHosts.add(instance.getTaskManagerID());
			}

			instance.markDead();

			totalNumberOfAliveTaskSlots -= instance.getTotalNumberOfSlots();

			notifyDeadInstance(instance);

			LOG.info(
				"Unregistered task manager " + instance.getTaskManagerLocation().addressString() +
				". Number of registered task managers " + getNumberOfRegisteredTaskManagers() +
				". Number of available slots " + getTotalNumberOfSlots() + ".");
		} else {
			LOG.warn("Tried to unregister instance {} but it is not registered.", instanceId);
		}
	}
475156
def unregister(self, name):
        
        try:
            name = name.name
        except AttributeError:
            pass
        return self.pop(name,None)
1304867
private void unbind(IActionTarget target) {
        if (targets.remove(target) && targets.isEmpty()) {
            getEventManager().unsubscribe(eventName, this);
        }
    }
966930
async def unban(self, channel, target, range=0):
        
        if target in self.users:
            host = self.users[target]['hostname']
        else:
            host = target

        host = self._format_host_range(host, range)
        mask = self._format_host_mask('*', '*', host)
        await self.rawmsg('MODE', channel, '-b', mask)
893567
def handle_target(self, request, controller_args, controller_kwargs):
        
        self.request = request
        super(AuthDecorator, self).handle_target(request, controller_args, controller_kwargs)
        del self.request
1083614
private void handleUnready(String address) {
    log.debug(String.format("%s - Received unready message from: %s", NetworkManager.this, address));
    ready.remove(address);
    checkUnready();
  }
866099
def unregister_message_handler(self, target_or_handler):
        
        if isinstance(target_or_handler, str):
            del self._message_handlers[target_or_handler]
        else:
            for key, val in self._message_handlers.items():
                if val == target_or_handler:
                    del self._message_handlers[key]
1066245
private function handle_reassign_sites() {
		$to   = array_map( 'absint', (array) filter_input( INPUT_POST, 'to', FILTER_FORCE_ARRAY ) );
		$from = array_map( 'absint', (array) filter_input( INPUT_POST, 'from', FILTER_FORCE_ARRAY ) );

		// Bail early if no movement.
		if ( empty( $to ) && empty( $from ) ) {
			return;
		}

		$network_id = filter_input( INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT );

		$moving_to   = array();
		$moving_from = array();

		$sites_list = get_sites( array(
			'network_id' => $network_id,
			'fields'     => 'ids',
		) );

		// Move sites out of current network.
		foreach ( $from as $site_id ) {
			if ( in_array( $site_id, $sites_list, true ) ) {
				$moving_from[] = $site_id;
			}
		}

		// Move sites into current network.
		foreach ( $to as $site_id ) {
			if ( ! in_array( $site_id, $sites_list, true ) ) {
				$moving_to[] = $site_id;
			}
		}

		$moving = array_filter( array_merge( $moving_to, $moving_from ) );

		// Loop through and move sites.
		foreach ( $moving as $site_id ) {
			$site = get_site( $site_id );

			// Skip if missing or main site.
			if ( empty( $site ) || is_main_site( $site->id, $site->network_id ) ) {
				continue;
			}

			if ( in_array( $site_id, $to, true ) && ! in_array( $site_id, $sites_list, true ) ) {
				move_site( $site_id, $network_id );
			} elseif ( in_array( $site_id, $from, true ) ) {
				move_site( $site_id, 0 );
			}
		}
	}
1128109
def unregister(self, id):
        '''
        
        '''
        result = self.rr.table(self.table).get(id).delete().run()
        if result != {
                'deleted':1, 'errors':0,'inserted':0,
                'replaced':0,'skipped':0,'unchanged':0}:
            self.logger.warn(
                    'unexpected result attempting to delete id=%s from '
                    'rethinkdb services table: %s', id, result)
458518
def unregister(self):
        """"""
        self.names.remove(self.uniquename)
        super(ConfigurableMeta, self).unregister()
138110
def clear_local_registration(self):
        '''
        
        '''
        delete_registered_file()
        delete_unregistered_file()
        write_to_disk(constants.machine_id_file, delete=True)
        logger.debug('Re-register set, forcing registration.')
        logger.debug('New machine-id: %s', generate_machine_id(new=True))
147798
def _maybe_registered(self, failure, new_reg):
        
        failure.trap(ServerError)
        response = failure.value.response
        if response.code == http.CONFLICT:
            reg = new_reg.update(
                resource=messages.UpdateRegistration.resource_type)
            uri = self._maybe_location(response)
            return self.update_registration(reg, uri=uri)
        return failure