Package brave.baggage
Interface BaggageField.ValueUpdater
-
- Enclosing class:
- BaggageField
public static interface BaggageField.ValueUpdater
Used to decouple baggage value updates fromTraceContext
orTraceContextOrSamplingFlags
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
All Methods Instance Methods Abstract Methods 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 Detail
-
NOOP
static final BaggageField.ValueUpdater NOOP
- Since:
- 5.12
-
-
Method Detail
-
updateValue
boolean updateValue(BaggageField field, @Nullable String value)
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)
-
-