Package brave.baggage
Interface BaggageField.ValueUpdater
- Enclosing class:
- BaggageField
public static interface BaggageField.ValueUpdater
Used to decouple baggage value updates from
TraceContext
or TraceContextOrSamplingFlags
storage.
Note: This type is safe to implement as a lambda, or use as a method reference as
it is effectively a FunctionalInterface
. It isn't annotated as such because the project
has a minimum Java language level 6.
- Since:
- 5.12
-
Field Summary
Fields Modifier and Type Field Description static BaggageField.ValueUpdater
NOOP
-
Method Summary
Modifier and Type Method Description boolean
updateValue(BaggageField field, String value)
Updates the value of the field, or ignores if read-only or not configured.
-
Field Details
-
NOOP
- Since:
- 5.12
-
-
Method Details
-
updateValue
Updates the value of the field, or ignores if read-only or not configured.- Parameters:
value
-null
is an attempt to remove the value- Returns:
true
if the underlying state changed- Since:
- 5.12
- See Also:
BaggageField.updateValue(TraceContext, String)
,BaggageField.updateValue(TraceContextOrSamplingFlags, String)
-