Interface BaggageBuilder

    • Method Detail

      • put

        BaggageBuilder put​(java.lang.String key,
                           java.lang.String value,
                           BaggageEntryMetadata entryMetadata)
        Adds the key/value pair and metadata regardless of whether the key is present.
        Parameters:
        key - the String key which will be set.
        value - the String value to set for the given key.
        entryMetadata - the BaggageEntryMetadata metadata to set for the given key.
        Returns:
        this
      • put

        default BaggageBuilder put​(java.lang.String key,
                                   java.lang.String value)
        Adds the key/value pair with empty metadata regardless of whether the key is present.
        Parameters:
        key - the String key which will be set.
        value - the String value to set for the given key.
        Returns:
        this
      • remove

        BaggageBuilder remove​(java.lang.String key)
        Removes the key if it exists.
        Parameters:
        key - the String key which will be removed.
        Returns:
        this
      • build

        Baggage build()
        Creates a Baggage from this builder.
        Returns:
        a Baggage with the same entries as this builder.