Package brave.baggage
Interface BaggageField.ValueUpdater
-
- Enclosing class:
- BaggageField
public static interface BaggageField.ValueUpdaterUsed to decouple baggage value updates fromTraceContextorTraceContextOrSamplingFlagsstorage.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.ValueUpdaterNOOP
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanupdateValue(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-nullis an attempt to remove the value- Returns:
trueif the underlying state changed- Since:
- 5.12
- See Also:
BaggageField.updateValue(TraceContext, String),BaggageField.updateValue(TraceContextOrSamplingFlags, String)
-
-