Add a List of {@link Token}s for a given message id.

@param messageId     to identify the list of tokens for the message.
@param messageTokens the List of {@link Token}s representing the message.
510490
public void addMessage(final long messageId, final List<Token> messageTokens)
    {
        Verify.notNull(messageTokens, "messageTokens");

        captureTypes(messageTokens, 0, messageTokens.size() - 1);
        updateComponentTokenCounts(messageTokens);

        messagesByIdMap.put(messageId, new ArrayList<>(messageTokens));
    }
64439
@Override
    protected List<TokenParser> createAllTokenParsers() {
        List<TokenParser> parsers = new ArrayList<>(60);

        // Quote from
        // http://httpd.apache.org/docs/current/mod/mod_log_config.html#logformat
        // Format String Description
        // -------
        // %% The percent sign
        parsers.add(new FixedStringTokenParser("%%", "%"));

        // -------
        // %a Remote IP-address
        parsers.addAll(createFirstAndLastTokenParsers("%a",
                "connection.client.ip", "IP",
                STRING_ONLY, FORMAT_CLF_IP));

        // %{c}a Underlying peer IP address of the connection (see the mod_remoteip module).
        parsers.addAll(createFirstAndLastTokenParsers("%{c}a",
                "connection.client.peerip", "IP",
                STRING_ONLY, FORMAT_CLF_IP));

        // -------
        // %A Local IP-address
        parsers.addAll(createFirstAndLastTokenParsers("%A",
                "connection.server.ip", "IP",
                STRING_ONLY, FORMAT_CLF_IP));

        // -------
        // %B Size of response in bytes, excluding HTTP headers.
        parsers.addAll(createFirstAndLastTokenParsers("%B",
                "response.body.bytes", "BYTES",
                STRING_OR_LONG, FORMAT_NUMBER));

        // -------
        // %b Size of response in bytes, excluding HTTP headers. In CLF format,
        // i.e. a '-' rather than a 0 when no bytes are sent.
        parsers.addAll(createFirstAndLastTokenParsers("%b",
            "response.body.bytes", "BYTESCLF",
            STRING_OR_LONG, FORMAT_CLF_NUMBER));

        // Additional support for the deprecated old output
        addExtraOutput(parsers, "%b",
            new TokenOutputField("BYTES", "response.body.bytesclf", STRING_OR_LONG)
            .deprecateFor("BYTESCLF:response.body.bytes"));

        // -------
        // %{Foobar}C The contents of cookie Foobar in the request sent to the server.
        parsers.add(new NamedTokenParser("\\%\\{([a-z0-9\\-_]*)\\}C",
                "request.cookies.", "HTTP.COOKIE",
                STRING_ONLY, FORMAT_STRING));

        // -------
        // %{FOOBAR}e The contents of the environment variable FOOBAR
        parsers.add(new NamedTokenParser("\\%\\{([a-z0-9\\-_]*)\\}e", "server.environment.", "VARIABLE",
                STRING_ONLY, FORMAT_STRING));

        // -------
        // %f Filename
        parsers.addAll(createFirstAndLastTokenParsers("%f",
                "server.filename", "FILENAME",
                STRING_ONLY, FORMAT_STRING));
        // -------

        // %h Remote host
        parsers.addAll(createFirstAndLastTokenParsers("%h",
                "connection.client.host", "IP",
                STRING_ONLY, FORMAT_NO_SPACE_STRING));

        // -------
        // %H The request protocol
        parsers.addAll(createFirstAndLastTokenParsers("%H",
                "request.protocol", "PROTOCOL",
                STRING_ONLY, FORMAT_NO_SPACE_STRING));

        // -------
        // %{Foobar}i The contents of Foobar: header line(s) in the request sent
        // to the server. Changes made by other modules (e.g. mod_headers)
        // affect this.
        parsers.add(new NamedTokenParser("\\%\\{([a-z0-9\\-_]*)\\}i",
                "request.header.", "HTTP.HEADER",
                STRING_ONLY, FORMAT_STRING));

        // -------
        // %{VARNAME}^ti The contents of VARNAME: trailer line(s) in the request sent to the server.
        parsers.add(new NamedTokenParser("\\%\\{([a-z0-9\\-_]*)\\}\\^ti",
                "request.trailer.", "HTTP.TRAILER",
                STRING_ONLY, FORMAT_STRING));

        // -------
        // %k Number of keepalive requests handled on this connection.
        // Interesting if KeepAlive is being used, so that, for example,
        // a '1' means the first keepalive request after the initial one, '
        // 2' the second, etc...;
        // otherwise this is always 0 (indicating the initial request).
        // Available in versions 2.2.11 and later.
        parsers.addAll(createFirstAndLastTokenParsers("%k",
                "connection.keepalivecount", "NUMBER",
                STRING_OR_LONG, FORMAT_NUMBER));

        // -------
        // %l Remote logname (from identd, if supplied). This will return a dash
        // unless mod_ident is present and IdentityCheck is set On.
        parsers.addAll(createFirstAndLastTokenParsers("%l",
                "connection.client.logname", "NUMBER",
                STRING_OR_LONG, FORMAT_CLF_NUMBER));

        // -------
        // %L The request log ID from the error log (or '-' if nothing has been logged to the error log for this request).
        // Look for the matching error log line to see what request caused what error.
        parsers.addAll(createFirstAndLastTokenParsers("%L",
                "request.errorlogid", "STRING",
                STRING_ONLY, FORMAT_NO_SPACE_STRING));

        // -------
        // %m The request method
        parsers.addAll(createFirstAndLastTokenParsers("%m",
                "request.method", "HTTP.METHOD",
                STRING_ONLY, FORMAT_NO_SPACE_STRING));

        // -------
        // %{Foobar}n The contents of note Foobar from another module.
        parsers.add(new NamedTokenParser("\\%\\{([a-z0-9\\-_]*)\\}n",
                "server.module_note.", "STRING",
                STRING_ONLY, FORMAT_STRING));

        // -------
        // %{Foobar}o The contents of Foobar: header line(s) in the response.
        parsers.add(new NamedTokenParser("\\%\\{([a-z0-9\\-]*)\\}o",
                "response.header.", "HTTP.HEADER",
                STRING_ONLY, FORMAT_STRING));

        // -------
        // %{VARNAME}^to The contents of VARNAME: trailer line(s) in the response sent from the server.
        parsers.add(new NamedTokenParser("\\%\\{([a-z0-9\\-_]*)\\}\\^to",
                "response.trailer.", "HTTP.TRAILER",
                STRING_ONLY, FORMAT_STRING));

        // -------
        // %p The canonical port of the server serving the request
        parsers.addAll(createFirstAndLastTokenParsers("%p",
                "request.server.port.canonical", "PORT",
                STRING_OR_LONG, FORMAT_NUMBER));

        // -------
        // %{format}p The canonical port of the server serving the request or
        // the server's actual port or the client's actual port. Valid formats
        // are canonical, local, or remote.
        parsers.addAll(createFirstAndLastTokenParsers("%{canonical}p",
                "connection.server.port.canonical", "PORT",
                STRING_OR_LONG, FORMAT_NUMBER));

        parsers.addAll(createFirstAndLastTokenParsers("%{local}p",
                "connection.server.port", "PORT",
                STRING_OR_LONG, FORMAT_NUMBER));

        parsers.addAll(createFirstAndLastTokenParsers("%{remote}p",
                "connection.client.port", "PORT",
                STRING_OR_LONG, FORMAT_NUMBER));

        // -------
        // %P The process ID of the child that serviced the request.
        parsers.addAll(createFirstAndLastTokenParsers("%P",
                "connection.server.child.processid", "NUMBER",
                STRING_OR_LONG, FORMAT_NUMBER));

        // -------
        // %{format}P The process ID or thread id of the child that serviced the
        // request. Valid formats are pid, tid, and hextid. hextid requires
        // APR 1.2.0 or higher.
        parsers.addAll(createFirstAndLastTokenParsers("%{pid}P",
                "connection.server.child.processid", "NUMBER",
                STRING_OR_LONG, FORMAT_NUMBER));

        parsers.addAll(createFirstAndLastTokenParsers("%{tid}P",
                "connection.server.child.threadid", "NUMBER",
                STRING_OR_LONG, FORMAT_NUMBER));

        parsers.addAll(createFirstAndLastTokenParsers("%{hextid}P",
                "connection.server.child.hexthreadid", "NUMBER",
                STRING_OR_LONG, FORMAT_CLF_HEXNUMBER));

        // -------
        // %q The query string (prepended with a ? if a query string exists,
        // otherwise an empty string)
        parsers.addAll(createFirstAndLastTokenParsers("%q",
                "request.querystring", "HTTP.QUERYSTRING",
                STRING_ONLY, FORMAT_NO_SPACE_STRING));

        // -------
        // %r First line of request
        parsers.addAll(createFirstAndLastTokenParsers("%r",
                "request.firstline", "HTTP.FIRSTLINE",
                STRING_ONLY, HttpFirstLineDissector.FIRSTLINE_REGEX));

        // -------
        // %R The handler generating the response (if any).
        parsers.addAll(createFirstAndLastTokenParsers("%R",
                "request.handler", "STRING",
                STRING_ONLY, FORMAT_STRING));

        // -------
        // %s Status. For requests that got internally redirected, this is the
        // status of the *original* request --- %>s for the last.
        parsers.addAll(createFirstAndLastTokenParsers("%s",
            "request.status", "STRING",
            STRING_ONLY, FORMAT_NO_SPACE_STRING, 0));

        // -------
        // %t Time the request was received (standard english format)
        parsers.addAll(createFirstAndLastTokenParsers("%t",
                "request.receive.time", "TIME.STAMP",
                STRING_ONLY, FORMAT_STANDARD_TIME_US));

        // %{format}t The time, in the form given by format, which should be in
        // strftime(3) format. (potentially localized)
        parsers.add(new ParameterizedTokenParser("\\%\\{([^\\}]*%[^\\}]*)\\}t",
            "request.receive.time", "TIME.STRFTIME_",
            STRING_ONLY, FORMAT_STRING,
            -1, new StrfTimeStampDissector())
            .setWarningMessageWhenUsed("Only some parts of localized timestamps are supported")
        );

        // If the format starts with begin: (default) the time is taken at the beginning of the request processing.
        // If it starts with end: it is the time when the log entry gets written, close to the end of the request processing.

        parsers.add(new ParameterizedTokenParser("\\%\\{begin:([^\\}]*%[^\\}]*)\\}t",
            "request.receive.time.begin", "TIME.STRFTIME_",
            STRING_ONLY, FORMAT_STRING,
            0, new StrfTimeStampDissector())
            .setWarningMessageWhenUsed("Only some parts of localized timestamps are supported")
        );

        parsers.add(new ParameterizedTokenParser("\\%\\{end:([^\\}]*%[^\\}]*)\\}t",
            "request.receive.time.end", "TIME.STRFTIME_",
            STRING_ONLY, FORMAT_STRING,
            0, new StrfTimeStampDissector())
            .setWarningMessageWhenUsed("Only some parts of localized timestamps are supported")
        );

        // In addition to the formats supported by strftime(3), the following format tokens are supported:
        // sec number of seconds since the Epoch
        // msec number of milliseconds since the Epoch
        // usec number of microseconds since the Epoch
        // msec_frac millisecond fraction
        // usec_frac microsecond fraction
        // These tokens can not be combined with each other or strftime(3) formatting in the same format string.
        // You can use multiple %{format}t tokens instead.

        // sec
        parsers.addAll(createFirstAndLastTokenParsers("%{sec}t",
            "request.receive.time.sec", "TIME.SECONDS",
            STRING_OR_LONG, FORMAT_NUMBER));

        parsers.addAll(createFirstAndLastTokenParsers("%{begin:sec}t",
            "request.receive.time.begin.sec", "TIME.SECONDS",
            STRING_OR_LONG, FORMAT_NUMBER));

        parsers.addAll(createFirstAndLastTokenParsers("%{end:sec}t",
            "request.receive.time.end.sec", "TIME.SECONDS",
            STRING_OR_LONG, FORMAT_NUMBER));

        // msec
        parsers.addAll(createFirstAndLastTokenParsers("%{msec}t",
                "request.receive.time.msec", "TIME.EPOCH",
                STRING_OR_LONG, FORMAT_NUMBER));

        // Additional support for the deprecated old output
        addExtraOutput(parsers, "%{msec}t",
            new TokenOutputField("TIME.EPOCH", "request.receive.time.begin.msec", STRING_OR_LONG)
                .deprecateFor("TIME.EPOCH:request.receive.time.msec"));

        parsers.addAll(createFirstAndLastTokenParsers("%{begin:msec}t",
                "request.receive.time.begin.msec", "TIME.EPOCH",
                STRING_OR_LONG, FORMAT_NUMBER));

        parsers.addAll(createFirstAndLastTokenParsers("%{end:msec}t",
                "request.receive.time.end.msec", "TIME.EPOCH",
                STRING_OR_LONG, FORMAT_NUMBER));

        // usec
        parsers.addAll(createFirstAndLastTokenParsers("%{usec}t",
                "request.receive.time.usec", "TIME.EPOCH.USEC",
                STRING_OR_LONG, FORMAT_NUMBER));

        // Additional support for the deprecated old output
        addExtraOutput(parsers, "%{usec}t",
            new TokenOutputField("TIME.EPOCH.USEC", "request.receive.time.begin.usec", STRING_OR_LONG)
                .deprecateFor("TIME.EPOCH.USEC:request.receive.time.usec"));

        parsers.addAll(createFirstAndLastTokenParsers("%{begin:usec}t",
                "request.receive.time.begin.usec", "TIME.EPOCH.USEC",
                STRING_OR_LONG, FORMAT_NUMBER));

        parsers.addAll(createFirstAndLastTokenParsers("%{end:usec}t",
                "request.receive.time.end.usec", "TIME.EPOCH.USEC",
                STRING_OR_LONG, FORMAT_NUMBER));

        // msec_frac
        parsers.addAll(createFirstAndLastTokenParsers("%{msec_frac}t",
                "request.receive.time.msec_frac", "TIME.EPOCH",
                STRING_OR_LONG, FORMAT_NUMBER));

        addExtraOutput(parsers, "%{msec_frac}t",
            new TokenOutputField("TIME.EPOCH", "request.receive.time.begin.msec_frac", STRING_OR_LONG)
                .deprecateFor("TIME.EPOCH:request.receive.time.msec_frac"));

        parsers.addAll(createFirstAndLastTokenParsers("%{begin:msec_frac}t",
                "request.receive.time.begin.msec_frac", "TIME.EPOCH",
                STRING_OR_LONG, FORMAT_NUMBER));

        parsers.addAll(createFirstAndLastTokenParsers("%{end:msec_frac}t",
                "request.receive.time.end.msec_frac", "TIME.EPOCH",
                STRING_OR_LONG, FORMAT_NUMBER));

        // usec_frac
        parsers.addAll(createFirstAndLastTokenParsers("%{usec_frac}t",
                "request.receive.time.usec_frac", "TIME.EPOCH.USEC_FRAC",
                STRING_OR_LONG, FORMAT_NUMBER));

        // Additional support for the deprecated old output
        addExtraOutput(parsers, "%{usec_frac}t",
            new TokenOutputField("TIME.EPOCH.USEC_FRAC", "request.receive.time.begin.usec_frac", STRING_OR_LONG)
                .deprecateFor("TIME.EPOCH.USEC_FRAC:request.receive.time.usec_frac"));

        parsers.addAll(createFirstAndLastTokenParsers("%{begin:usec_frac}t",
                "request.receive.time.begin.usec_frac", "TIME.EPOCH.USEC_FRAC",
                STRING_OR_LONG, FORMAT_NUMBER));

        parsers.addAll(createFirstAndLastTokenParsers("%{end:usec_frac}t",
                "request.receive.time.end.usec_frac", "TIME.EPOCH.USEC_FRAC",
                STRING_OR_LONG, FORMAT_NUMBER));

        // -------
        // %T The time taken to serve the request, in seconds.
        parsers.addAll(createFirstAndLastTokenParsers("%T",
                "response.server.processing.time", "SECONDS",
                STRING_OR_LONG, FORMAT_NUMBER));

        // -------
        // %D The time taken to serve the request, in microseconds.
        parsers.addAll(createFirstAndLastTokenParsers("%D",
            "response.server.processing.time", "MICROSECONDS",
            STRING_OR_LONG, FORMAT_NUMBER));

        // Additional support for the deprecated old output
        addExtraOutput(parsers, "%D",
            new TokenOutputField("MICROSECONDS", "server.process.time", STRING_OR_LONG)
            .deprecateFor("MICROSECONDS:response.server.processing.time"));

        // -------
        // %{UNIT}T The time taken to serve the request, in a time unit given by UNIT.
        // Valid units are ms for milliseconds, us for microseconds, and s for seconds.
        // Using s gives the same result as %T without any format;
        // Using us gives the same result as %D.
        parsers.addAll(createFirstAndLastTokenParsers("%{us}T",
            "response.server.processing.time", "MICROSECONDS",
            STRING_OR_LONG, FORMAT_NUMBER));
        parsers.addAll(createFirstAndLastTokenParsers("%{ms}T",
            "response.server.processing.time", "MILLISECONDS",
            STRING_OR_LONG, FORMAT_NUMBER));
        parsers.addAll(createFirstAndLastTokenParsers("%{s}T",
            "response.server.processing.time", "SECONDS",
            STRING_OR_LONG, FORMAT_NUMBER));

        // -------
        // %u Remote user (from auth; may be bogus if return status (%s) is 401)
        parsers.addAll(createFirstAndLastTokenParsers("%u",
                "connection.client.user", "STRING",
                STRING_ONLY, FORMAT_NO_SPACE_STRING));

        // -------
        // %U The URL path requested, not including any query string.
        parsers.addAll(createFirstAndLastTokenParsers("%U",
                "request.urlpath", "URI",
                STRING_ONLY, FORMAT_NO_SPACE_STRING));

        // -------
        // %v The canonical ServerName of the server serving the request.
        parsers.addAll(createFirstAndLastTokenParsers("%v",
                "connection.server.name.canonical", "STRING",
                STRING_ONLY,  FORMAT_NO_SPACE_STRING));

        // -------
        // %V The server name according to the UseCanonicalName setting.
        parsers.addAll(createFirstAndLastTokenParsers("%V",
                "connection.server.name", "STRING",
                STRING_ONLY, FORMAT_NO_SPACE_STRING));

        // -------
        // %X Connection status when response is completed:
        // X = connection aborted before the response completed.
        // + = connection may be kept alive after the response is sent.
        // - = connection will be closed after the response is sent.
        // (This directive was %c in late versions of Apache 1.3, but this
        // conflicted with the historical ssl %{var}c syntax.)
        parsers.addAll(createFirstAndLastTokenParsers("%X",
                "response.connection.status", "HTTP.CONNECTSTATUS",
                STRING_ONLY, FORMAT_NO_SPACE_STRING));

        // -------
        // %I Bytes received, including request and headers, cannot be zero. You
        // need to enable mod_logio to use this.
        // NOTE: In reality this CAN ben 0 (in case of HTTP 408 error code)
        parsers.addAll(createFirstAndLastTokenParsers("%I",
                "request.bytes", "BYTES",
                STRING_OR_LONG, FORMAT_CLF_NUMBER));

        // -------
        // %O Bytes sent, including headers, cannot be zero. You need to enable
        // mod_logio to use this.
        // NOTE: In reality this CAN ben 0 (in case of HTTP 408 error code)
        parsers.addAll(createFirstAndLastTokenParsers("%O",
                "response.bytes", "BYTES",
                STRING_OR_LONG, FORMAT_CLF_NUMBER));

        // -------
        // %S Bytes transferred (received and sent), including request and headers, cannot be zero.
        // This is the combination of %I and %O. You need to enable mod_logio to use this.
        parsers.addAll(createFirstAndLastTokenParsers("%S",
                "total.bytes", "BYTES",
                STRING_OR_LONG, TokenParser.FORMAT_NON_ZERO_NUMBER));

        // Some explicit type overrides.
        // The '1' at the end indicates this is more important than the default TokenParser (which has an implicit 0).
        parsers.addAll(createFirstAndLastTokenParsers("%{cookie}i",
                "request.cookies",    "HTTP.COOKIES",
                STRING_ONLY, FORMAT_STRING, 1));
        parsers.addAll(createFirstAndLastTokenParsers("%{set-cookie}o",
                "response.cookies",   "HTTP.SETCOOKIES",
                STRING_ONLY, FORMAT_STRING, 1));
        parsers.addAll(createFirstAndLastTokenParsers("%{user-agent}i",
                "request.user-agent", "HTTP.USERAGENT",
                STRING_ONLY, FORMAT_STRING, 1));
        parsers.addAll(createFirstAndLastTokenParsers("%{referer}i",
                "request.referer",    "HTTP.URI",
                STRING_ONLY, FORMAT_STRING, 1));

        return parsers;
    }
852368
public void addParticipants(@NonNull final String conversationId, @NonNull final List<Participant> participants, @Nullable Callback<ComapiResult<Void>> callback) {
        adapter.adapt(addParticipants(conversationId, participants), callback);
    }
751263
@Transactional
  public void addMissingMessageIds(String namespace, Set<String> messageIDs) {
    Set<String> alreadyPresent =
        getExistingMessages(namespace, messageIDs)
            .map(L10nString::getMessageID)
            .collect(toCollection(TreeSet::new));
    Set<String> toAdd = Sets.difference(messageIDs, alreadyPresent);
    if (!toAdd.isEmpty()) {
      Stream<L10nString> entities =
          toAdd
              .stream()
              .map(key -> l10nStringFactory.create(key).setMessageID(key))
              .map(l -> l.setNamespace(namespace));
      dataService.add(L10N_STRING, entities);
      LOG.debug("Added message IDs to namespace '{}' : {}.", namespace, messageIDs);
    }
  }
269417
void addTags(Message<?> message, SpanCustomizer result, MessageChannel channel) {
		// TODO topic etc
		if (channel != null) {
			result.tag("channel", messageChannelName(channel));
		}
	}
1218359
@Override
    public synchronized void setFlags(final Flags flag, final boolean set) throws MessagingException {

        super.setFlags(flag, set);

        if (flagChangeListener != null) {
            flagChangeListener.onFlagChange(this, flag, set);
        }

    }
648035
public void setSQSMessageId(String sqsMessageID) throws JMSException {
        this.sqsMessageID = sqsMessageID;
        this.setJMSMessageID(String.format(SQSMessagingClientConstants.MESSAGE_ID_FORMAT, sqsMessageID));
    }
1229247
void addMessageHandler(SubscriptionMessageHandler messageHandler)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "addMessageHandler", messageHandler);

    final boolean inserted = _subscriptionMessagePool.add(messageHandler);
    // If the message wasn't inserted, then the pool was exceeded
    if (!inserted)
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        SibTr.debug(
          tc,
         "SubscriptionObjectPool size exceeded");

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "addMessageHandler");
  }
1341278
public void removeMessage(String messageId) {
        Collection<ValidationMessage<Origin>> toRemove = new ArrayList<ValidationMessage<Origin>>();

        for (ValidationMessage<Origin> message : messages) {
            if (messageId.equals(message.getMessageKey())) {
                toRemove.add(message);
            }
        }
        messages.removeAll(toRemove);
    }
580816
public void addWarningMsgs(final Set<String> msgs) {
    if (msgs != null) {
      this._warningMsgs.addAll(msgs);
      if (!msgs.isEmpty() && this._errorMsgs.isEmpty()) {
        this._status = ValidationStatus.WARN;
      }
    }
  }
89319
public function addToken(int $symbolId, int ...$tokenIdList): void
    {
        if (empty($tokenIdList)) {
            return;
        }
        if (!isset($this->tokenMap[$symbolId])) {
            $this->tokenMap[$symbolId] = $tokenIdList;
            $this->increaseChangeCount(count($tokenIdList));
            return;
        }
        $newTokenIdList = array_diff($tokenIdList, $this->tokenMap[$symbolId]);
        if (empty($newTokenIdList)) {
            return;
        }
        $this->tokenMap[$symbolId] = array_merge($this->tokenMap[$symbolId], $newTokenIdList);
        $this->increaseChangeCount(count($newTokenIdList));
    }
349507
@Override
	public final void setJMSMessageID(String id) throws JMSException
    {
    	assertDeserializationLevel(MessageSerializationLevel.FULL);
        this.id = id;
    }
1074876
Observable<ComapiResult<Void>> markDelivered(String conversationId, Set<String> ids) {

        final List<MessageStatusUpdate> updates = new ArrayList<>();
        updates.add(MessageStatusUpdate.builder().setMessagesIds(ids).setStatus(MessageStatus.delivered).setTimestamp(DateHelper.getCurrentUTC()).build());

        return checkState().flatMap(client -> client.service().messaging().updateMessageStatus(conversationId, updates)
                .retryWhen(observable -> {
                    return observable.zipWith(Observable.range(1, 3), (Func2<Throwable, Integer, Integer>) (throwable, integer) -> integer).flatMap(new Func1<Integer, Observable<Long>>() {
                        @Override
                        public Observable<Long> call(Integer retryCount) {
                            return Observable.timer((long) Math.pow(1, retryCount), TimeUnit.SECONDS);
                        }
                    });
                }
                ));
    }
828091
final void addAll(Collection<Message> messages)
        throws NullPointerException {

        for (final Message message : messages) {
            add(message);
        }
    }
1194395
public void addMessages(List<CmsMessages> messages) {

        if (messages == null) {
            throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_MULTIMSG_EMPTY_LIST_0));
        }

        Iterator<CmsMessages> i = messages.iterator();
        while (i.hasNext()) {
            addMessages(i.next());
        }
    }
1334068
private void addTokens(List<AnalyzedToken> taggedTokens, List<AnalyzedToken> l) {
    if (taggedTokens != null) {
      for (AnalyzedToken at : taggedTokens) {
        l.add(at);
      }
    }
  }
640347
public function verifyToken($messageId, $token)
    {
        try {
            $verification = $this->getTokenResult($messageId, $token);

            return ($verification->getStatusCode() === Verification::STATUS_SUCCESS);
        } catch (Exception $e) {
            return false;
        }
    }