/** * <p> * Update the {@link ExampleBag} set in {@code baggage}. This method will overwrite any existing * ExampleBag set in {@code baggage}. * </p> * * <p> * This method does <b>not</b> affect the {@link BaggageContext} being carried by the current thread. To set the * {@link ExampleBag} for the current thread, use {@link #set(ExampleBag)} * </p> * * @param baggage A baggage instance to set the {@link ExampleBag} in * @param exampleBag the new ExampleBag to set in {@code baggage}. If {@code null}, it will remove any * mapping present. * @return a possibly new {@link BaggageContext} instance that contains all previous mappings plus the new mapping. */ public static BaggageContext setIn(BaggageContext baggage, ExampleBag exampleBag) { return BDLContextProvider.set(baggage, Handler.registration(), exampleBag); }
/** * <p> * Update the {@link SimpleBag} set in {@code baggage}. This method will overwrite any existing * SimpleBag set in {@code baggage}. * </p> * * <p> * This method does <b>not</b> affect the {@link BaggageContext} being carried by the current thread. To set the * {@link SimpleBag} for the current thread, use {@link #set(SimpleBag)} * </p> * * @param baggage A baggage instance to set the {@link SimpleBag} in * @param simpleBag the new SimpleBag to set in {@code baggage}. If {@code null}, it will remove any * mapping present. * @return a possibly new {@link BaggageContext} instance that contains all previous mappings plus the new mapping. */ public static BaggageContext setIn(BaggageContext baggage, SimpleBag simpleBag) { return BDLContextProvider.set(baggage, Handler.registration(), simpleBag); }
/** * <p> * Update the {@link SimpleBag2} set in {@code baggage}. This method will overwrite any existing * SimpleBag2 set in {@code baggage}. * </p> * * <p> * This method does <b>not</b> affect the {@link BaggageContext} being carried by the current thread. To set the * {@link SimpleBag2} for the current thread, use {@link #set(SimpleBag2)} * </p> * * @param baggage A baggage instance to set the {@link SimpleBag2} in * @param simpleBag2 the new SimpleBag2 to set in {@code baggage}. If {@code null}, it will remove any * mapping present. * @return a possibly new {@link BaggageContext} instance that contains all previous mappings plus the new mapping. */ public static BaggageContext setIn(BaggageContext baggage, SimpleBag2 simpleBag2) { return BDLContextProvider.set(baggage, Handler.registration(), simpleBag2); }
/** * <p> * Update the {@link FonsecaBag} set in {@code baggage}. This method will overwrite any existing * FonsecaBag set in {@code baggage}. * </p> * * <p> * This method does <b>not</b> affect the {@link BaggageContext} being carried by the current thread. To set the * {@link FonsecaBag} for the current thread, use {@link #set(FonsecaBag)} * </p> * * @param baggage A baggage instance to set the {@link FonsecaBag} in * @param fonsecaBag the new FonsecaBag to set in {@code baggage}. If {@code null}, it will remove any * mapping present. * @return a possibly new {@link BaggageContext} instance that contains all previous mappings plus the new mapping. */ public static BaggageContext setIn(BaggageContext baggage, FonsecaBag fonsecaBag) { return BDLContextProvider.set(baggage, Handler.registration(), fonsecaBag); }
/** * <p> * Update the {@link XTraceBaggage} set in {@code baggage}. This method will overwrite any existing * XTraceBaggage set in {@code baggage}. * </p> * * <p> * This method does <b>not</b> affect the {@link BaggageContext} being carried by the current thread. To set the * {@link XTraceBaggage} for the current thread, use {@link #set(XTraceBaggage)} * </p> * * @param baggage A baggage instance to set the {@link XTraceBaggage} in * @param xTraceBaggage the new XTraceBaggage to set in {@code baggage}. If {@code null}, it will remove any * mapping present. * @return a possibly new {@link BaggageContext} instance that contains all previous mappings plus the new mapping. */ public static BaggageContext setIn(BaggageContext baggage, XTraceBaggage xTraceBaggage) { return BDLContextProvider.set(baggage, Handler.registration(), xTraceBaggage); }
/** * <p> * Update the {@link SimpleBag2} set in the current thread's baggage. This method will overwrite any existing * SimpleBag2 set in the current thread's baggage. * </p> * * <p> * To set the {@link SimpleBag2} in a specific {@link BaggageContext} instance, use * {@link #setIn(BaggageContext, SimpleBag2)} * </p> * * @param simpleBag2 the new {@link SimpleBag2} to set in the current thread's {@link BaggageContext}. If {@code null} * then any existing mappings will be removed. */ public static void set(SimpleBag2 simpleBag2) { ActiveBaggage.update(BDLContextProvider.set(ActiveBaggage.peek(), Handler.registration(), simpleBag2)); }
/** * <p> * Update the {@link FonsecaBag} set in the current thread's baggage. This method will overwrite any existing * FonsecaBag set in the current thread's baggage. * </p> * * <p> * To set the {@link FonsecaBag} in a specific {@link BaggageContext} instance, use * {@link #setIn(BaggageContext, FonsecaBag)} * </p> * * @param fonsecaBag the new {@link FonsecaBag} to set in the current thread's {@link BaggageContext}. If {@code null} * then any existing mappings will be removed. */ public static void set(FonsecaBag fonsecaBag) { ActiveBaggage.update(BDLContextProvider.set(ActiveBaggage.peek(), Handler.registration(), fonsecaBag)); }
/** * <p> * Update the {@link XTraceBaggage} set in the current thread's baggage. This method will overwrite any existing * XTraceBaggage set in the current thread's baggage. * </p> * * <p> * To set the {@link XTraceBaggage} in a specific {@link BaggageContext} instance, use * {@link #setIn(BaggageContext, XTraceBaggage)} * </p> * * @param xTraceBaggage the new {@link XTraceBaggage} to set in the current thread's {@link BaggageContext}. If {@code null} * then any existing mappings will be removed. */ public static void set(XTraceBaggage xTraceBaggage) { ActiveBaggage.update(BDLContextProvider.set(ActiveBaggage.peek(), Handler.registration(), xTraceBaggage)); }
/** * <p> * Update the {@link SimpleBag} set in the current thread's baggage. This method will overwrite any existing * SimpleBag set in the current thread's baggage. * </p> * * <p> * To set the {@link SimpleBag} in a specific {@link BaggageContext} instance, use * {@link #setIn(BaggageContext, SimpleBag)} * </p> * * @param simpleBag the new {@link SimpleBag} to set in the current thread's {@link BaggageContext}. If {@code null} * then any existing mappings will be removed. */ public static void set(SimpleBag simpleBag) { ActiveBaggage.update(BDLContextProvider.set(ActiveBaggage.peek(), Handler.registration(), simpleBag)); }
/** * <p> * Update the {@link ExampleBag} set in the current thread's baggage. This method will overwrite any existing * ExampleBag set in the current thread's baggage. * </p> * * <p> * To set the {@link ExampleBag} in a specific {@link BaggageContext} instance, use * {@link #setIn(BaggageContext, ExampleBag)} * </p> * * @param exampleBag the new {@link ExampleBag} to set in the current thread's {@link BaggageContext}. If {@code null} * then any existing mappings will be removed. */ public static void set(ExampleBag exampleBag) { ActiveBaggage.update(BDLContextProvider.set(ActiveBaggage.peek(), Handler.registration(), exampleBag)); }