Adds a message to the cache.

@param message The message to add.
183434
public void addMessageToCache(Message message) {
        messages.compute(message.getId(), (key, value) -> {
            if ((value == null) || (value.get() == null)) {
                WeakReference<Message> result = new WeakReference<>(message, messagesCleanupQueue);
                messageIdByRef.put(result, key);
                return result;
            }
            return value;
        });
    }
1063636
@Override
    public void info(String message) {
        if(this.logger.isInfoEnabled()) {
            this.logger.info(buildMessage(message));
        }
    }
1049879
public void setWarningMessage(String message) {

        m_messageText.setInnerText(message);
        addStyleName(formCss().hasWarning());
        m_hasError = true;
    }
339875
public void setMessage(String message) {

        checkFrozen();
        if (isEnabled() && CmsStringUtil.isEmptyOrWhitespaceOnly(message)) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_LOGIN_MESSAGE_BAD_MESSAGE_0));
        }
        m_message = message;
    }
761400
public function addMessage($message) {
        $migrationName = get_class($this);
        $this->messages[] = sprintf("%s:  %s\n", $migrationName, $message);
    }
904129
protected void populate( MimeMessage message )
    throws MessagingException
  {
    // add all of the to addresses.
    message.addRecipients(Message.RecipientType.TO, toSet.toInternetAddressArray());
    message.addRecipients(Message.RecipientType.CC, ccSet.toInternetAddressArray());
    message.addRecipients(Message.RecipientType.BCC, bccSet.toInternetAddressArray());
    message.setFrom(from);
    if( replyTo != null ) {
      message.setReplyTo(new InternetAddress[] {replyTo});
    }
    if( subject != null ) {
      message.setSubject(subject);
    }
  }
218737
public ConditionMessage append(String message) {
		if (!StringUtils.hasLength(message)) {
			return this;
		}
		if (!StringUtils.hasLength(this.message)) {
			return new ConditionMessage(message);
		}

		return new ConditionMessage(this.message + " " + message);
	}
277841
public void increaseCacheSizeInBytes(long size, String msg) {
        if (this.memoryCacheSizeInMBEnabled) {
            this.currentMemoryCacheSizeInBytes += size;
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "increaseCacheSizeInBytes() cacheName=" + cacheName + " " + msg + " size=" + size + " currentMemoryCacheSizeInBytes="
                        + this.currentMemoryCacheSizeInBytes);
            }
        }
    }
48160
private synchronized void add(long pTime,String message) {
        debugEntries.addFirst(new Entry(pTime,message));
        trim();
    }
976623
private void addMessage(final WMessageBox box, final Message message, final boolean encode) {
		String code = message.getMessage();

		if (!Util.empty(code)) {
			box.addMessage(encode, code, message.getArgs());
		}
	}
1186324
public final void info(Object message) {

        if (isLevelEnabled(SimpleLog.LOG_LEVEL_INFO)) {
            log(SimpleLog.LOG_LEVEL_INFO, message, null);
        }
    }
1365228
protected void info(String message) {
		final Log log = getLog();
		if (log != null)
			log.info(message);
	}
688888
public BType addBuilder(final MType message) {
    ensureMutableMessageList();
    ensureBuilders();
    final SingleFieldBuilder<MType, BType, IType> builder =
        newSingleFieldBuilder(message, this, isClean);
    messages.add(null);
    builders.add(builder);
    onChanged();
    incrementModCounts();
    return builder.getBuilder();
  }
196557
public void removeMessage(Message message) {
        synchronized (messages) {
            messages.removeIf(messageRef -> Objects.equals(messageRef.get(), message));
        }
    }
749440
@Override
    public void set(final String messageID, final XMLObject message) {
        log.debug("Storing message {} to session {}", messageID, context.getSessionStore().getOrCreateSessionId(context));
        final LinkedHashMap<String, XMLObject> messages = getMessages();
        messages.put(messageID, message);
        updateSession(messages);
    }
880359
public static void message(String message, Throwable e) {
    if(message == null && e != null) {
      message = e.getMessage();
    }
    logExpensive(Level.INFO, message, e);
  }
725011
void addNewMessage(JsMessageWrapper message, boolean isStored, boolean isRecoverable)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc,
                  "addNewMessage",
                  new Object[] { new Integer(hashCode()),
                                 message,
                                 new Boolean(isStored)});

    JsMessage jsMsg = message.getMessage();

    long id = jsMsg.getSystemMessageValue();
    SIBUuid8 uuid = jsMsg.getSystemMessageSourceUuid();

    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
      SibTr.debug(tc,
                  "addNewMessage",
                  new Object[] { new Integer(hashCode()),
                                 new Long(jsMsg.getSystemMessageValue()),
                                 jsMsg.getSystemMessageSourceUuid(),
                                 message,
                                 new Boolean(isStored)});

    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
      SibTr.debug(localConsumerPoint, tc, "verboseMsg OUT : " + message.getMessage().toVerboseString());

    synchronized(this)
    {
      LMEMessage newElement = null;
      long messageReferenceExpiry = messageProcessor.getCustomProperties().get_message_reference_expiry_value();

      // We have to create an object if the pool is empty
      if(pooledMsg == null)
      {
        newElement = new LMEMessage(id, uuid, message, isStored, isRecoverable, messageLockExpiry, messageReferenceExpiry);
      }
      // Otherwise pop the first pooled object and use that
      else
      {
        newElement = pooledMsg;
        pooledMsg = pooledMsg.next;
        newElement.next = null;
        pooledCount--;

        newElement.reuseMessage(id, uuid, message, isStored, isRecoverable, messageLockExpiry, messageReferenceExpiry);
      }

      // Add the message to the end of the list
      newElement.previous = lastMsg;
      if(lastMsg != null)
        lastMsg.next = newElement;
      else
        firstMsg = newElement;
      lastMsg = newElement;

      // If the locks are set to expire and this is the first message we need to
      // register an alarm
      if(messageLockExpiry != 0)
      {
        // If there are no other messages expiring, this will be the first one
        if(nextMsgToExpire == null)
          nextMsgToExpire = newElement;

        // If we don't have an alarm registered, register one now
        if(!alarmRegistered)
        {
          if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.debug(tc, "addNewMessage", "Registering MessageLock Expiry alarm for: " + nextMsgToExpire);

          alarmManager.create(messageLockExpiry, this);
          alarmRegistered = true;
        }
      }

      if (messageReferenceExpiry != 0)
      {
        if (messageLockExpiry != 0 && messageReferenceExpiry > messageLockExpiry)
        {
          // The messageReferenceExpiry is greater than the messageLockExpiry. There is no
          // point in creating the alarm for messageReferenceExpiry as the message lock expiry
          // will always go first.
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          {
            SibTr.debug(tc, "MessageReferenceExpiry: "+messageReferenceExpiry+" is greater than messageLockExpiry: "+messageLockExpiry);
            SibTr.debug(tc, "MessageReferneceExpiry Alarm not registered");
          }
        }
        else
        {
          try
          {
            if (message.getReportCOD() == null)
            {
              // Now register the message reference expiry alarm
              // If there are no other message references expiring, this will be the first one
              if(nextMsgReferenceToExpire == null)
                nextMsgReferenceToExpire = newElement;

              // If we don't have an alarm registered, register one now
              if(!msgReferenceAlarmRegistered)
              {
                if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  SibTr.debug(tc, "addNewMessage", "Registering MessageReference Expiry alarm for: " + nextMsgReferenceToExpire);

                alarmManager.create(messageReferenceExpiry, new MessageReferenceExpiryAlarm());
                msgReferenceAlarmRegistered = true;
              }
            }
          }
          catch(SIResourceException e)
          {
            // No FFDC code needed

            // There was a problem getting hold of the ReportCOD of the message
            // assume it is set and don't create the expiry alarm.
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              SibTr.debug(tc, "Thrown exception when trying to create msg ref expiry alarm: " + e);
          }
        }
     }

      // By adding a message we must be about to call consumeMessages and therefore
      // we're in a valid state for calls
      validState = true;
    } // synchronized

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