Add a remove observer to this entity.
763452
def on_remove(self, callable_):
        
        self.model.add_observer(
            callable_, self.entity_type, 'remove', self.entity_id)
1244046
@Override
    public void removeSynchronizationObserver(Observer<Registry<KEY, ENTRY>, Long> observer) {
        synchronisationObservable.removeObserver(observer);
    }
750462
def register_observer(self, observer, events=None):
        
        if events is not None and not isinstance(events, (tuple, list)):
            events = (events,)

        if observer in self._observers:
            LOG.warning("Observer '%r' already registered, overwriting for events"
                        " %r", observer, events)
        self._observers[observer] = events
841150
def cancel(self):
        """"""
        if self.OBSERVE_UPDATES:
            self.detach()
        self.ioloop.add_callback(self.cancel_timeouts)
457000
public void removeModificationObserver (String path, ModificationObserver obs)
    {
        ObservedResource resource = _observed.get(path);
        if (resource != null) {
            resource.observers.remove(obs);
        }
    }
515882
@SuppressWarnings("WeakerAccess")
    @MainThread
    public void removeObservers(@NonNull final LifecycleOwner owner) {
        assertMainThread("removeObservers");
        for (Map.Entry<Observer<T>, ObserverWrapper> entry : mObservers) {
            if (entry.getValue().isAttachedTo(owner)) {
                removeObserver(entry.getKey());
            }
        }
    }
973410
def remove_observer(self, observer, callble=None):
        
        to_remove = []
        for poc in self.observers:
            _, obs, clble = poc
            if callble is not None:
                if (obs is observer) and (callble == clble):
                    to_remove.append(poc)
            else:
                if obs is observer:
                    to_remove.append(poc)
        for r in to_remove:
            self.observers.remove(*r)
276319
public <T> void evict(T entity) {
        DocumentInfo documentInfo = documentsByEntity.get(entity);
        if (documentInfo != null) {
            documentsByEntity.remove(entity);
            documentsById.remove(documentInfo.getId());
        }

        deletedEntities.remove(entity);
        if (_countersByDocId != null) {
            _countersByDocId.remove(documentInfo.getId());
        }
    }
598737
def unregister(self, entity_class, entity):
        
        EntityState.release(entity, self)
        self.__entity_set_map[entity_class].remove(entity)
166568
function () {
                        for (var name in observing) {
                            var ob = observing[name];
                            ob.observe.obj.unbind(ob.observe.attr, onchanged);
                            delete observing[name];
                        }
                    }
1230496
public void addStaleCacheObserver (String cache, StaleCacheObserver observer)
    {
        ObserverList<StaleCacheObserver> list = _cacheobs.get(cache);
        if (list == null) {
            list = ObserverList.newFastUnsafe();
            _cacheobs.put(cache, list);
        }
        list.add(observer);
    }
881113
public void setNotifyDelete(boolean notify)  {
        addField(ConfigureNodeFields.notify_delete, FormField.Type.bool);
        setAnswer(ConfigureNodeFields.notify_delete.getFieldName(), notify);
    }
1123762
public AlertEntityConditionService remove(Entity entity, long conditionId)
    {
        return remove(entity.getId(), entity.getType(), conditionId);
    }
382539
function(observer, skipUpdate) {
    this.observers.add(observer);
    if (!skipUpdate) {
      observer.forceUpdateNextSync = true;
      observer.sync();
    }
  }
290295
void setChanged() {

        enableSave();
        m_changedEntityIds.add(m_entityId);
        m_deletedEntities.remove(m_entityId);
        updateOverlayPosition();
        setEditorState(true);
    }
839356
public void remove(Object e)
    {
        // Invoke Pre Remove Events

        // TODO Check for validity also as per JPA
        if (e == null)
        {
            throw new IllegalArgumentException("Entity to be removed must not be null.");
        }

        EntityMetadata metadata = getMetadata(e.getClass());

        // Create an object graph of the entity object
        ObjectGraph graph = new GraphGenerator().generateGraph(e, this, new ManagedState());

        Node node = graph.getHeadNode();

        try
        {
            lock.writeLock().lock();

            // TODO : push into action queue, get original end-point from
            // persistenceContext first!

            // Action/ExecutionQueue/ActivityQueue :-> id, name, EndPoint,
            // changed
            // state

            // Change state of node, after successful flush processing.
            node.setPersistenceDelegator(this);
            node.remove();

            // build flush stack.

            flushManager.buildFlushStack(node, EventType.DELETE);

            // Flush node.
            flush();
        }
        finally
        {
            lock.writeLock().unlock();
        }
        // clear out graph
        graph.clear();
        graph = null;

        if (log.isDebugEnabled())
        {
            log.debug("Data removed successfully for entity : " + e.getClass());
        }
    }
505953
private void doUpdateRO(final Collection<String> remove, final Collection<Document> add) throws IOException
   {
      SecurityHelper.doPrivilegedIOExceptionAction(new PrivilegedExceptionAction<Object>()
      {
         @SuppressWarnings("resource")
         public Object run() throws Exception
         {
            // make sure a reader is available during long updates
            if (add.size() > handler.getBufferSize())
            {
               try
               {
                  releaseMultiReader();
               }
               catch (IOException e)
               {
                  // do not fail if an exception is thrown here
                  LOG.warn("unable to prepare index reader " + "for queries during update", e);
               }
            }
            synchronized (updateMonitor)
            {
                 ReadOnlyIndexReader[] readers = null;
                 try
                 {
                     for (Iterator<String> it = remove.iterator(); it.hasNext(); )
                     {
                         Term idTerm = new Term(FieldNames.UUID, it.next());
                         int num = volatileIndex.removeDocument(idTerm);
                         if (num == 0)
                         {
                             for (int i = indexes.size() - 1; i >= 0; i--)
                             {
                                 // only look in registered indexes
                                 PersistentIndex idx = indexes.get(i);
                                 if (indexNames.contains(idx.getName()))
                                 {
                                     num = idx.removeDocument(idTerm);
                                     if (num > 0)
                                     {
                                         if (LOG.isDebugEnabled())
                                             LOG.debug(idTerm.text() + " has been found in the persisted index " + i);
                                         break;
                                     }
                                 }
                             }
                         }
                         else if (LOG.isDebugEnabled())
                         {
                             LOG.debug(idTerm.text() + " has been found in the volatile index");
                         }
                     }
                     // try to avoid getting index reader for each doc
                     IndexReader indexReader = null;

                     for (Iterator<Document> it = add.iterator(); it.hasNext(); )
                     {
                         Document doc = it.next();
                         if (doc != null)
                         {
                             // check if this item should be placed in own volatile index
                             // usually it must be indexed, but exception if it exists in persisted index
                             boolean addDoc = true;

                             // make this check safe if something goes wrong
                             String uuid = doc.get(FieldNames.UUID);
                             // if remove contains uuid, node should be re-indexed
                             // if not, than should be checked if node present in the last persisted index
                             if (!remove.contains(uuid))
                             {
                                 // if index list changed, get the reader on the latest index
                                 // or if index reader is not current
                                 if (indexReader == null)
                                 {
                                     try
                                     {
                                         readers = getReadOnlyIndexReaders(false, false);
                                         indexReader = new MultiReader(readers);
                                     }
                                     catch (Throwable e)//NOSONAR
                                     {
                                         // this is safe index reader retrieval. The last index already closed, possibly merged or
                                         // any other exception that occurs here
                                         LOG.warn("Could not create the MultiReader :" + e.getLocalizedMessage());
                                         LOG.debug("Could not create the MultiReader", e);
                                     }
                                 }
                                 if ((indexReader != null && !indexReader.isCurrent()))
                                 {
                                     // safe release reader
                                     if (indexReader != null)
                                     {
                                         for (ReadOnlyIndexReader reader : readers)
                                         {
                                             reader.release();
                                         }
                                     }
                                     try
                                     {
                                         readers = getReadOnlyIndexReaders(false, false);
                                         indexReader = new MultiReader(readers);
                                     }
                                     catch (Throwable e)//NOSONAR
                                     {
                                         // this is safe index reader retrieval. The last index already closed, possibly merged or
                                         // any other exception that occurs here
                                         LOG.warn("Could not create the MultiReader :" + e.getLocalizedMessage());
                                         LOG.debug("Could not create the MultiReader", e);
                                     }
                                 }
                                 // if indexReader exists (it is possible that no persisted indexes exists on start)
                                 if (indexReader != null)
                                 {
                                     TermDocs termDocs = null;
                                     try
                                     {
                                         // reader from resisted index should be
                                         termDocs = indexReader.termDocs(new Term(FieldNames.UUID, uuid));
                                         // node should be indexed if not found in persistent index
                                         addDoc = !termDocs.next();
                                     }
                                     catch (Exception e)
                                     {
                                         LOG.debug("Some exception occured, during index check");
                                     }
                                     finally
                                     {
                                         if (termDocs != null)
                                             termDocs.close();
                                     }
                                 }
                             }
                             if (addDoc)
                             {
                                 volatileIndex.addDocuments(new Document[]{doc});
                             }
                             else if (LOG.isDebugEnabled())
                             {
                                 LOG.debug("Could find the document {} in the last persisted index", uuid);
                             }
                         }
                     }
                 }
                 finally
                 {
                     // don't forget to release a reader anyway
                     if (readers != null)
                     {
                         for (ReadOnlyIndexReader reader : readers)
                         {
                             reader.release();
                         }
                     }
                     releaseMultiReader();
                 }
            }
            return null;
         }
      });
   }