Removes a message from the cache.

@param message The message to remove.
196557
public void removeMessage(Message message) {
        synchronized (messages) {
            messages.removeIf(messageRef -> Objects.equals(messageRef.get(), message));
        }
    }
1349982
protected void removeDragAndDropMessage() {

        if (m_dragAndDropMessage != null) {
            m_dragAndDropMessage.removeFromParent();
            m_dragAndDropMessage = null;
            getContentWrapper().getElement().getStyle().clearBackgroundColor();
        }
    }
1137640
public void removeMessageFromCache(long messageId) {
        WeakReference<Message> messageRef = messages.remove(messageId);
        if (messageRef != null) {
            messageIdByRef.remove(messageRef, messageId);
        }
    }
1035498
@Override
    protected void closeSession(String message) {
        GSSContext ctx = (GSSContext) getSession().getAttribute(GSS_CONTEXT);
        if (ctx != null) {
            try {
                ctx.dispose();
            } catch (GSSException e) {
                e.printStackTrace();
                super.closeSession(message, e);
                return;
            }
        }
        super.closeSession(message);
    }
328778
private void doQueueClear(final Message<JsonObject> message) {
    final String name = message.body().getString("name");
    if (name == null) {
      message.reply(new JsonObject().putString("status", "error").putString("message", "No name specified."));
      return;
    }

    context.execute(new Action<Void>() {
      @Override
      public Void perform() {
        data.getQueue(formatKey(name)).clear();
        return null;
      }
    }, new Handler<AsyncResult<Void>>() {
      @Override
      public void handle(AsyncResult<Void> result) {
        if (result.failed()) {
          message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
        } else {
          message.reply(new JsonObject().putString("status", "ok"));
        }
      }
    });
  }
1048001
public static void unwindMessages(final Object message, final List<Object> messages) {
        if (message instanceof Iterable) {
            @SuppressWarnings("rawtypes")
            final Iterator it = ((Iterable) message).iterator();
            while (it.hasNext())
                unwindMessages(it.next(), messages);
        } else
            messages.add(message);
    }
1040494
@SuppressWarnings({"unused", "WeakerAccess"})
    public void deleteInboxMessage(final CTInboxMessage message){
        postAsyncSafely("deleteInboxMessage", new Runnable() {
            @Override
            public void run() {
                synchronized (inboxControllerLock) {
                    if (ctInboxController != null) {
                       boolean update = ctInboxController.deleteMessageWithId(message.getMessageId());
                       if (update) {
                           _notifyInboxMessagesDidUpdate();
                       }
                    } else {
                        getConfigLogger().debug(getAccountId(), "Notification Inbox not initialized");
                    }
                }
            }});
    }
1174387
public void removeFromQueue(T t) {
        synchronized (messages) {
            for (Map.Entry<Long, Message> messageEntry : messages.entrySet()) {
                if (messageEntry.getValue().equals(t)) {
                    Message message = messages.remove(messageEntry.getKey());
                    recycle(message);
                    notifyQueueChanged();
                    return;
                }
            }
        }
    }
199201
protected void addMessage(String message)
    {
        messages.add(message);
        messageCount++;
        if (messageCount > messagesQueueMax)
        {
            messages.remove();
            messageCount--;
        }
    }
115983
private void doMultiMapRemove(final Message<JsonObject> message) {
    final String name = message.body().getString("name");
    if (name == null) {
      message.reply(new JsonObject().putString("status", "error").putString("message", "No name specified."));
      return;
    }

    final Object key = message.body().getValue("key");
    if (key == null) {
      message.reply(new JsonObject().putString("status", "error").putString("message", "No key specified."));
      return;
    }

    final Object value = message.body().getValue("value");
    if (value != null) {
      context.execute(new Action<Boolean>() {
        @Override
        public Boolean perform() {
          return data.getMultiMap(formatKey(name)).remove(key, value);
        }
      }, new Handler<AsyncResult<Boolean>>() {
        @Override
        public void handle(AsyncResult<Boolean> result) {
          if (result.failed()) {
            message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
          } else {
            message.reply(new JsonObject().putString("status", "ok").putBoolean("result", result.result()));
          }
        }
      });
    } else {
      context.execute(new Action<Collection<Object>>() {
        @Override
        public Collection<Object> perform() {
          return data.getMultiMap(formatKey(name)).remove(key);
        }
      }, new Handler<AsyncResult<Collection<Object>>>() {
        @Override
        public void handle(AsyncResult<Collection<Object>> result) {
          if (result.failed()) {
            message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
          } else {
            message.reply(new JsonObject().putString("status", "ok").putArray("result", new JsonArray(result.result().toArray(new Object[result.result().size()]))));
          }
        }
      });
    }
  }
828801
public void setMessage(CharSequence message){
        if(mConstruct != null && !mConstruct.getDesign().isMaterial()){
            TextView msgView = (TextView) getDialog().findViewById(R.id.message);
            msgView.setText(message);
        }else{
            if(mMessage != null){
                mMessage.setText(message);
            }
        }
    }
279971
@Override
	public void processMessage( Message message ) {

		if( message instanceof MsgNotifMachineDown )
			processMsgNotifMachineDown((MsgNotifMachineDown) message );

		else if( message instanceof MsgNotifInstanceChanged )
			processMsgNotifInstanceChanged((MsgNotifInstanceChanged) message );

		else if( message instanceof MsgNotifInstanceRemoved )
			processMsgNotifInstanceRemoved((MsgNotifInstanceRemoved) message );

		else if( message instanceof MsgNotifHeartbeat )
			processMsgNotifHeartbeat((MsgNotifHeartbeat) message );

		else if(message instanceof MsgNotifAutonomic)
			processMsgMonitoringEvent((MsgNotifAutonomic) message );

		else if( message instanceof MsgEcho )
			this.manager.debugMngr().notifyMsgEchoReceived((MsgEcho) message );

		else if( message instanceof MsgNotifLogs )
			processMsgNotifLogs((MsgNotifLogs) message );

		else
			this.logger.warning( "The DM got an undetermined message to process: " + message.getClass().getName());
	}
589142
public void setBusy(String message) {
        busyMessage = message = StrUtil.formatMessage(message);

        if (busyDisabled) {
            busyPending = true;
        } else if (message != null) {
            disableActions(true);
            ClientUtil.busy(container, message);
            busyPending = !isVisible();
        } else {
            disableActions(false);
            ClientUtil.busy(container, null);
            busyPending = false;
        }
    }
983992
public void setMessage(String message) {
        requireArgument(message != null && !message.isEmpty(), "Message cannot be null or empty.");
        this.message = message;
    }
632310
public void addMessage(Message message) {
        synchronized (messages) {
            api.addMessageToCache(message);
            if (messages.stream().map(Reference::get).anyMatch(message::equals)) {
                return;
            }
            // Add the message in the correct order
            messages.removeIf(messageRef -> messageRef.get() == null);
            Reference<Message> messageRef = new SoftReference<>(message, messagesCleanupQueue);
            int pos = Collections.binarySearch(messages, messageRef, Comparator.comparing(Reference::get));
            if (pos < 0) {
                pos = -pos - 1;
            }
            messages.add(pos, messageRef);
        }
    }
848620
public static void removeSyncCache(String name) {
		if (StrKit.isBlank(name)) {
			return;
		}
		if (GlobalSyncRedis.caches.containsKey(name)) {
			GlobalSyncRedis.caches.remove(name);
		}
	}
333290
protected void removeMessage(LMEMessage message)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "removeMessage", new Object[] {new Integer(hashCode()), message, this });

    // If this was the message we entered the callback with we need
    // to move the start point back a bit
    if(message == callbackEntryMsg)
      callbackEntryMsg = message.previous;

    // If this is our current message we need to move the cursor
    // back a bit
    if(message == currentMsg)
      currentMsg = message.previous;

    // If this message was the next to expire we move the expiry cursor on to
    // the next eligible message. We leave any alarm registered so that it pops,
    // when this happens it realises the alarm is not valid for the next expiring
    // message and re-registers itself for the correct time. This gives us the
    // best performance when no locks are expiring as we're not continually
    // registering and de-registering alarms for every message
    if(message == nextMsgToExpire)
    {
      do
      {
        nextMsgToExpire = nextMsgToExpire.next;
      }
      while((nextMsgToExpire != null) && (nextMsgToExpire.expiryTime == 0));
    }

    if(message == nextMsgReferenceToExpire)
    {
      do
      {
        nextMsgReferenceToExpire = nextMsgReferenceToExpire.next;
      }
      while((nextMsgReferenceToExpire != null) && (nextMsgReferenceToExpire.expiryTime == 0));
    }

    // Unlink this message from the list
    if(message.previous != null)
      message.previous.next = message.next;
    else
      firstMsg = message.next;

    if(message.next != null)
      message.next.previous = message.previous;
    else
      lastMsg = message.previous;

    // Pool the element if there's space
    if(pooledCount < poolSize)
    {
      message.message = null;
      message.next = pooledMsg;
      message.previous = null;
      message.owner = null;
      message.jsMessage = null;
      message.expiryTime = 0;
      message.expiryMsgReferenceTime = 0;
      pooledMsg = message;
      pooledCount++;
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "removeMessage", this);
  }