Interface WritableBaggage

All Superinterfaces:
Baggage

public interface WritableBaggage extends Baggage
Behavior of Baggage that can be updated.
  • Method Summary

    Modifier and Type
    Method
    Description
    set(String key, String value)
    Adds a new or overrides an existing setting for the specified key using the provided value.
    set(String key, String value, String metadata)
    Adds a new or overrides an existing setting for the specified key using the provided value and baggage metadata.

    Methods inherited from interface Baggage

    containsKey, get, keys
    Modifier and Type
    Method
    Description
    boolean
    Returns whether the specified key is present in the baggage.
    get(String key)
    Returns the value for the specified baggage key.
    Returns the keys present in the baggage.
  • Method Details

    • set

      WritableBaggage set(String key, String value)
      Adds a new or overrides an existing setting for the specified key using the provided value.
      Parameters:
      key - name of the entry to add or update
      value - value to assign to the entry
      Returns:
      the baggage instance (for chained invocation)
    • set

      default WritableBaggage set(String key, String value, String metadata)
      Adds a new or overrides an existing setting for the specified key using the provided value and baggage metadata.
      Parameters:
      key - name of the entry to add or update
      value - value to assign to the entry
      metadata - metadata to assign to the entry
      Returns:
      the baggage instance (for chained invocation)