Package brave.context.rxjava2
Class CurrentTraceContextAssemblyTracking
- java.lang.Object
-
- brave.context.rxjava2.CurrentTraceContextAssemblyTracking
-
public final class CurrentTraceContextAssemblyTracking extends Object
Prevents traces from breaking during RxJava operations by scoping trace context that existed at assembly time around callbacks or computation of new values.The design of this library borrows heavily from https://github.com/akaita/RxJava2Debug and https://github.com/akarnokd/RxJava2Extensions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCurrentTraceContextAssemblyTracking.SavedHooks
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CurrentTraceContextAssemblyTrackingcreate(CurrentTraceContext delegate)static voiddisable()Disables the validation hooks be resetting the assembled hooks to none.voidenable()Enable the protocol violation hooks.CurrentTraceContextAssemblyTracking.SavedHooksenableAndChain()Enable the protocol violation hooks by chaining it before any existing hook.static booleanisEnabled()Returns true if the validation hooks have been installed.
-
-
-
Method Detail
-
create
public static CurrentTraceContextAssemblyTracking create(CurrentTraceContext delegate)
-
enable
public void enable()
Enable the protocol violation hooks.- See Also:
enableAndChain(),disable()
-
enableAndChain
public CurrentTraceContextAssemblyTracking.SavedHooks enableAndChain()
Enable the protocol violation hooks by chaining it before any existing hook.- Returns:
- the SavedHooks instance that allows restoring the previous assembly hook handlers overridden by this method
- See Also:
enable()
-
disable
public static void disable()
Disables the validation hooks be resetting the assembled hooks to none.
-
isEnabled
public static boolean isEnabled()
Returns true if the validation hooks have been installed.
-
-