- java.lang.Object
-
- brave.internal.PropagationFields<java.lang.String,java.lang.String>
-
- brave.internal.PredefinedPropagationFields
-
public class PredefinedPropagationFields extends PropagationFields<java.lang.String,java.lang.String>
Copy-on-write keeps propagation changes in a child context from affecting its parent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class brave.internal.PropagationFields
PropagationFields.FieldConsumer<K,V>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPredefinedPropagationFields(PredefinedPropagationFields parent, java.lang.String... fieldNames)protectedPredefinedPropagationFields(java.lang.String... fieldNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)voidforEach(PropagationFields.FieldConsumer<java.lang.String,java.lang.String> fieldConsumer)Invokes the consumer for every non-null field valuejava.lang.Stringget(int index)java.lang.Stringget(java.lang.String name)Returns the value of the field with the specified key or null if not availableinthashCode()booleanisEmpty()voidput(int index, java.lang.String value)voidput(java.lang.String name, java.lang.String value)Replaces the value of the field with the specified key, ignoring if not a permitted fieldprotected voidputAllIfAbsent(PropagationFields parent)java.util.Map<java.lang.String,java.lang.String>toMap()for testing and default toStringjava.lang.StringtoString()-
Methods inherited from class brave.internal.PropagationFields
get, put
-
-
-
-
Constructor Detail
-
PredefinedPropagationFields
protected PredefinedPropagationFields(java.lang.String... fieldNames)
-
PredefinedPropagationFields
protected PredefinedPropagationFields(PredefinedPropagationFields parent, java.lang.String... fieldNames)
-
-
Method Detail
-
get
public java.lang.String get(java.lang.String name)
Description copied from class:PropagationFieldsReturns the value of the field with the specified key or null if not available- Specified by:
getin classPropagationFields<java.lang.String,java.lang.String>
-
get
public java.lang.String get(int index)
-
forEach
public void forEach(PropagationFields.FieldConsumer<java.lang.String,java.lang.String> fieldConsumer)
Description copied from class:PropagationFieldsInvokes the consumer for every non-null field value- Specified by:
forEachin classPropagationFields<java.lang.String,java.lang.String>
-
put
public final void put(java.lang.String name, java.lang.String value)Description copied from class:PropagationFieldsReplaces the value of the field with the specified key, ignoring if not a permitted field- Specified by:
putin classPropagationFields<java.lang.String,java.lang.String>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin classPropagationFields<java.lang.String,java.lang.String>
-
put
public final void put(int index, java.lang.String value)
-
putAllIfAbsent
protected final void putAllIfAbsent(PropagationFields parent)
-
toMap
public final java.util.Map<java.lang.String,java.lang.String> toMap()
Description copied from class:PropagationFieldsfor testing and default toString- Specified by:
toMapin classPropagationFields<java.lang.String,java.lang.String>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classPropagationFields<java.lang.String,java.lang.String>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
-