Method to send a message to a RabbitMQ Exchange after a Target was
deleted.

@param deleteEvent
the TargetDeletedEvent which holds the necessary data for
sending a target delete message.
481965
@EventListener(classes = TargetDeletedEvent.class)
    protected void targetDelete(final TargetDeletedEvent deleteEvent) {
        if (isNotFromSelf(deleteEvent)) {
            return;
        }
        sendDeleteMessage(deleteEvent.getTenant(), deleteEvent.getControllerId(), deleteEvent.getTargetAddress());
    }
1001585
public Future<DeleteMessageResult> deleteMessage(DeleteMessageRequest request,
            AsyncHandler<DeleteMessageRequest, DeleteMessageResult> handler) {
        QueueBufferCallback<DeleteMessageRequest, DeleteMessageResult> callback = null;
        if (handler != null) {
            callback = new QueueBufferCallback<DeleteMessageRequest, DeleteMessageResult>(handler, request);
        }

        QueueBufferFuture<DeleteMessageRequest, DeleteMessageResult> future = sendBuffer.deleteMessage(request, callback);
        future.setBuffer(this);
        return future;
    }
327972
protected void sendEntryModifiedEvent(CacheEntryEvent<T> event)
    {
        for (org.xwiki.cache.event.CacheEntryListener<T> listener : this.cacheEntryListeners
            .getListeners(org.xwiki.cache.event.CacheEntryListener.class)) {
            listener.cacheEntryModified(event);
        }
    }
59332
@EventListener(classes = CancelTargetAssignmentEvent.class)
    protected void targetCancelAssignmentToDistributionSet(final CancelTargetAssignmentEvent cancelEvent) {
        if (isNotFromSelf(cancelEvent)) {
            return;
        }

        sendCancelMessageToTarget(cancelEvent.getTenant(), cancelEvent.getEntity().getControllerId(),
                cancelEvent.getActionId(), cancelEvent.getEntity().getAddress());
    }
156237
@Subscribe
    public void handleIndexSetDeletion(final IndexSetDeletedEvent event) {
        final String indexSetId = event.id();

        LOG.debug("Disable field type updating for index set <{}>", indexSetId);
        cancel(futures.remove(indexSetId));
    }
120912
public function delete(): void
    {
        // 'deleted' header changed, force to reload headers, would be better to set deleted flag to true on header
        $this->clearHeaders();

        if (!\imap_delete($this->resource->getStream(), $this->getNumber(), \FT_UID)) {
            throw new MessageDeleteException(\sprintf('Message "%s" cannot be deleted', $this->getNumber()));
        }
    }
216606
@Override
    public java.util.concurrent.Future<DeleteMessageResult> deleteMessageAsync(String queueUrl, String receiptHandle) {

        return deleteMessageAsync(new DeleteMessageRequest().withQueueUrl(queueUrl).withReceiptHandle(receiptHandle));
    }
1352675
private void sendDelayedMessage(SuperToast superToast, int messageId, long delay) {
        Message message = obtainMessage(messageId);
        message.obj = superToast;
        sendMessageDelayed(message, delay);
    }
923656
public synchronized void syncRemoveValueTick(long tick, Transaction msTran, SIMPMessage msgToDiscard) throws SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "syncRemoveValueTick",
        new Object[] { Long.valueOf(tick), msTran });

    AOValue value = null;
    boolean transitionToFlushed;
    TickRange r2;
    
    stream.setCursor(tick);
    TickRange r = stream.getNext();
  
    if (r.type == TickRange.Value)
    {
      value = (AOValue) r.value;
      if (value.removing)
      {
        // already being removed so do nothing
        value = null;
      }
      else
      {
        value.removing = true;
      }
    }
    
    r2 = new TickRange(TickRange.Completed, tick, tick);
    r2 = stream.writeCompleted(r2);
    if (!active)
      r2 = null;

    // all ticks may be completed now, so set flushed to true etc.
    transitionToFlushed = tryTransitionToFlushed();
    
    
    
    if (value != null)
    {
      dem.removeTimeoutEntry(value);
      try
      {
        if ((value.getStorageStrategy() == AbstractItem.STORE_ALWAYS)
        || (value.getStorageStrategy() == AbstractItem.STORE_EVENTUALLY))
        {
          // PK67067 We may not find a message in the store for this tick, because
          // it may have been removed using the SIBQueuePoint MBean
          if (msgToDiscard != null && msgToDiscard.isInStore())
            msgToDiscard.remove(msTran, value.getPLockId());
          value.remove(msTran, AbstractItem.NO_LOCK_ID);
        }
        else
        {
          // PK67067 We may not find a message in the store for this tick, because
          // it may have been removed using the SIBQueuePoint MBean
          if (msgToDiscard != null && msgToDiscard.isInStore()) 
            msgToDiscard.remove(msTran, msgToDiscard.getLockID());
        }

      }
      catch (MessageStoreException e)
      {
        // FFDC
        FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.impl.AOStream.syncRemoveValueTick",
          "1:2176:1.80.3.24",
          this);            
        SibTr.exception(tc, e);        
        
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
          SibTr.exit(tc, "syncRemoveValueTick", e);
        
        throw new SIResourceException(e);
      }
        
      if (r2 != null)
      {
        parent.sendCompleted(remoteMEUuid, gatheringTargetDestUuid, streamId, r2);
      }
      if (transitionToFlushed)
      {
        parent.sendFlushed(remoteMEUuid, gatheringTargetDestUuid, streamId);
      }
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "syncRemoveValueTick");
  }
516905
private void sendEvent(Event event, ComponentDescriptor<?> descriptor, ComponentManager componentManager)
    {
        if (this.observationManager != null) {
            this.observationManager.notify(event, componentManager, descriptor);
        }
    }
671528
private void postDelete(MembershipType type) throws Exception
   {
      for (MembershipTypeEventListener listener : listeners)
      {
         listener.postDelete(type);
      }
   }
934185
public void delete() 
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "delete");
    
    

    // Mark the destination for deletion
    try
    {
      // Set the deletion flag in the DH persistently. A transaction per DH??
      LocalTransaction siTran = txManager.createLocalTransaction(true);

      setToBeDeleted(true);
      
      // Adjust the destination lookups in Destination Manager
      destinationManager.getLinkIndex().delete(this);
      
      requestUpdate((Transaction) siTran);
      // commit the transaction
      siTran.commit();
      
      String name = _mqLinkName;
      if (name == null)      
        name = getName();
      SibTr.info(tc, "MQLINK_DEST_DELETE_INFO_CWSIP0064", 
                   new Object[]{name, _mqLinkUuid});   
    }
    catch (MessageStoreException e)
    {
      // No FFDC code needed
      
      SibTr.exception(tc, e);
      
      //throw e;
    }
    catch (SIException e)
    {
      // No FFDC code needed
      
      SibTr.exception(tc, e);
       
      //handleRollback(siTran);
      //        throw e;
    }    

    // Now start the asynch deletion thread to tidy up
    destinationManager.startAsynchDeletion();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "delete");        
  }
1256387
public function deleteIndex(IndexEvent $event)
    {
        $name = $event->getIndexName();
        $data = $this->getClient()->indices()->delete(array("index" => $name));
        $event->setExtraData($data);
    }
276225
public void postEvent (DEvent event)
    {
        if (_tevent != null) {
            _tevent.postEvent(event);

        } else if (_omgr != null) {
            _omgr.postEvent(event);

        } else {
            log.info("Dropping event for non- or no longer managed object", "oid", getOid(),
                     "class", getClass().getName(), "event", event);
        }
    }
937675
public function preDelete(DeleteEvent $event)
    {
        /** @var Organization $organization */
        $organization = $event->getObject();
        if ($organization->isDefault()) {
            $event->block();

            // we can also throw an exception
        }

        $keys = $this->om->getRepository(CryptographicKey::class)->findBy(['organization' => $organization]);

        foreach ($keys as $key) {
            $this->crud->delete($key);
        }
    }
446925
public void deleteCurrent(SITransaction transaction)
  throws SISessionUnavailableException, SISessionDroppedException,
         SIResourceException, SIConnectionLostException, SILimitExceededException,
         SIIncorrectCallException,
         SIErrorException, SIMPMessageNotLockedException
  {
    if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
      SibTr.entry(CoreSPILockedMessageEnumeration.tc, "deleteCurrent",
        new Object[] {new Integer(hashCode()), transaction, this});

    checkValidState("deleteCurrent");

    localConsumerPoint.checkNotClosed();

    if (transaction != null && !((TransactionCommon)transaction).isAlive())
    {
      SIIncorrectCallException e = new SIIncorrectCallException( nls.getFormattedMessage(
        "TRANSACTION_DELETE_USAGE_ERROR_CWSIP0778",
           new Object[] { consumerSession.getDestinationAddress() },
           null) );

      if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
        SibTr.exception(tc, e);

      if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
        SibTr.exit(CoreSPILockedMessageEnumeration.tc, "deleteCurrent", e);

      throw e;
    }

    JsMessageWrapper msg = null;
    boolean isStored = false;

    synchronized(this)
    {
      checkCurrentMessageAvailable((TransactionCommon) transaction);

      // Pull out the interesting bits of the message
      msg = currentMsg.message;
      isStored = currentMsg.isStored;

      //remove the message from the list
      removeMessage(currentMsg);

      // There is now no message under the cursor
      messageAvailable = false;
    } // synchronized


    if((msg != null))
    {
      // If the message was not recoverable (not on an itemStream) we've finished
      // Otherwise delete it from MS
      if (isStored)
      {
        removeMessageFromStore(msg,
                               (TransactionCommon) transaction,
                               true); // true = decrement active message count
      }
      else // !isStored
      {
        localConsumerPoint.removeActiveMessages(1);
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
      SibTr.exit(CoreSPILockedMessageEnumeration.tc, "deleteCurrent", this);
  }
848663
public static event delete(nitro_service client, event resource) throws Exception
	{
		resource.validate("delete");
		return ((event[]) resource.delete_resource(client))[0];
	}