Class ImmutableBaggage

All Implemented Interfaces:
Baggage, ImplicitContextKeyed

@Immutable final class ImmutableBaggage extends ImmutableKeyValuePairs<String,BaggageEntry> implements Baggage
  • Field Details

    • EMPTY

      private static final Baggage EMPTY
  • Constructor Details

    • ImmutableBaggage

      private ImmutableBaggage(Object[] data)
  • Method Details

    • empty

      static Baggage empty()
    • builder

      static BaggageBuilder builder()
    • getEntryValue

      @Nullable public String getEntryValue(String entryKey)
      Description copied from interface: Baggage
      Returns the String value associated with the given key, without metadata.
      Specified by:
      getEntryValue in interface Baggage
      Parameters:
      entryKey - entry key to return the value for.
      Returns:
      the value associated with the given key, or null if no Entry with the given entryKey is in this Baggage.
    • getEntry

      @Nullable public BaggageEntry getEntry(String entryKey)
      Description copied from interface: Baggage
      Returns the BaggageEntry associated with the given key.
      Specified by:
      getEntry in interface Baggage
      Parameters:
      entryKey - entry key to return the BaggageEntry for, or null if no Entry with the given entryKey is in this Baggage.
    • toBuilder

      public BaggageBuilder toBuilder()
      Description copied from interface: Baggage
      Create a Builder pre-initialized with the contents of this Baggage. The returned Builder will be set to not use an implicit parent, so any parent assignment must be done manually.
      Specified by:
      toBuilder in interface Baggage
    • sortAndFilterToBaggage

      private static Baggage sortAndFilterToBaggage(Object[] data)