send notification of entity change
486700
private void notifyOfEntityEvent(Collection<ITypedReferenceableInstance> entityDefinitions,
                                     EntityNotification.OperationType operationType) throws AtlasException {
        List<EntityNotification> messages = new LinkedList<>();

        for (IReferenceableInstance entityDefinition : entityDefinitions) {
            Referenceable       entity                  = new Referenceable(entityDefinition);
            Map<String, Object> attributesMap           = entity.getValuesMap();
            List<String>        entityNotificationAttrs = getNotificationAttributes(entity.getTypeName());

            if (MapUtils.isNotEmpty(attributesMap) && CollectionUtils.isNotEmpty(entityNotificationAttrs)) {
                for (String entityAttr : attributesMap.keySet()) {
                    if (!entityNotificationAttrs.contains(entityAttr)) {
                        entity.setNull(entityAttr);
                    }
                }
            }

            EntityNotificationImpl notification = new EntityNotificationImpl(entity, operationType, getAllTraits(entity, typeSystem));

            messages.add(notification);
        }

        notificationInterface.send(NotificationInterface.NotificationType.ENTITIES, messages);
    }
268081
def _notifyDone(self):
        '''
        
        '''
        if self.notified:
            return

        self.doneevent.set()

        for buid in self.mybldgbuids:
            del self.allbldgbuids[buid]

        self.notified = True
405069
public static void notifyChange(Context context, Uri uri, ContentObserver observer) {
        ContentResolver resolver = context.getContentResolver();
        resolver.notifyChange(uri, observer);
    }
218437
def _nt_on_change(self, key, value, isNew):
        """"""
        self._send_update({"k": key, "v": value, "n": isNew})
1027225
@Override
    public void notifyChanged() {
        if (getNotification() && getListenerCount() > 0) {
            List<IChemObjectListener> listeners = lazyChemObjectListeners();
            for (Object listener : listeners) {
                ((IChemObjectListener) listener).stateChanged(new QueryChemObjectChangeEvent(this));
            }
        }
    }
320318
async def send_notification(self, method, args=()):
        ''''''
        message = self.connection.send_notification(Notification(method, args))
        await self._send_message(message)
234107
def notify(options = {})
      @@options = options
      @@options[:entity_class] = self
      @@options[:callbacks] = []
      [:create, :update, :destroy].each {|_method| @@options[:callbacks] << @@options[:actions].delete(_method)}
      @@options[:callbacks].compact!
      open_sender_class
      open_receiver_class
      open_notified_class
      @@notified_flag = true
    end
1219429
private function addListenerToEntityIfRequired(EntityInterface $entity): void
    {
        if (!$entity instanceof NotifyPropertyChanged) {
            return;
        }
        $listener = $this->entityManager->getUnitOfWork();
        $entity->addPropertyChangedListener($listener);
    }
1007164
def notify(self, data):
        """"""
        string_channels = {
            ChannelIdentifiers.de_registrations,
            ChannelIdentifiers.registrations_expired
        }

        if data['channel'] in string_channels:
            message = {'device_id': data["value"], 'channel': data["channel"]}
        else:
            message = DeviceStateChanges._map_endpoint_data(data)

        return super(DeviceStateChanges, self).notify(message)
694808
def notify_observers(table, kind, primary_key=None):
    

    if IN_MIGRATIONS:
        return

    # Don't propagate events when there are no observers to receive them.
    if not Observer.objects.filter(dependencies__table=table).exists():
        return

    def handler():
        """Send a notification to the given channel."""
        try:
            async_to_sync(get_channel_layer().send)(
                CHANNEL_MAIN,
                {
                    'type': TYPE_ORM_NOTIFY,
                    'table': table,
                    'kind': kind,
                    'primary_key': str(primary_key),
                },
            )
        except ChannelFull:
            logger.exception("Unable to notify workers.")

    batcher = PrioritizedBatcher.global_instance()
    if batcher.is_started:
        # If a batch is open, queue the send via the batcher.
        batcher.add(
            'rest_framework_reactive', handler, group_by=(table, kind, primary_key)
        )
    else:
        # If no batch is open, invoke immediately.
        handler()
1000533
protected static void requestNotificationOnChange(JvmType type, Runnable listener) {
		Resource resource = type.eResource();
		if (resource instanceof TypeResource) {
			IMirror mirror = ((TypeResource) resource).getMirror();
			if (mirror instanceof IMirrorExtension) {
				if (((IMirrorExtension) mirror).isSealed())
					return;
			}
		}
		Notifier notifier = type;
		if (resource != null) {
			if (resource.getResourceSet() != null)
				notifier = resource.getResourceSet();
			else
				notifier = resource;
		}
		JvmTypeChangeDispatcher dispatcher = JvmTypeChangeDispatcher.findResourceChangeDispatcher(notifier);
		dispatcher.requestNotificationOnChange(type, listener);
	}
151057
def sendIq(self, entity):
        
        if entity.getType() == IqProtocolEntity.TYPE_SET and entity.getXmlns() == "w:m":
            #media upload!
            self._sendIq(entity, self.onRequestUploadSuccess, self.onRequestUploadError)
15697
def on_change(self, callable_):
        
        self.model.add_observer(
            callable_, self.entity_type, 'change', self.entity_id)
115619
def _notify_thing_lid_change(self, from_lid, to_lid):
        """"""
        try:
            with self.__private_things:
                self.__private_things[to_lid] = self.__private_things.pop(from_lid)
        except KeyError:
            logger.warning('Thing %s renamed (to %s), but not in private lookup table', from_lid, to_lid)
        else:
            # renaming could happen before get_thing is called on the original
            try:
                with self.__new_things:
                    self.__new_things[to_lid] = self.__new_things.pop(from_lid)
            except KeyError:
                pass
1113718
def send(self, change):
        """"""
        self.buf.append(change)
        if len(self.buf) % self.BUF_SIZE == 0:
            self.flush()
505149
def meta_changed(self, model, prop_name, info):
        
        if self.parent is not None:
            msg = info.arg
            # Add information about notification to the signal message
            notification = Notification(model, prop_name, info)
            msg = msg._replace(notification=notification)
            info.arg = msg
            self.parent.meta_changed(model, prop_name, info)
1223255
def _update_notification(self, message=None):
        """"""
        if message is None:
            message = ''
        message_label = self._parts['notification label']
        message_label.config(text=message)
        self._base.update()