Package io.micrometer.context
@NullMarked
package io.micrometer.context
This package contains abstractions and implementations for context propagation.
ThreadLocalAccessorandContextAccessorallow applications and frameworks to plug in support forThreadLocaland other Map-like types of context such as the Project Reactor Contexts.ContextRegistryprovides a static instance with global access to all known accessors that should be registered on startup.ContextSnapshotuses theContextRegistryand is used to capture context values, and then propagate them from one type of context to another or from one thread to another.
-
ClassDescriptionContextAccessor<READ,
WRITE> ContextExecutorService<EXECUTOR extends ExecutorService>Wraps anExecutorServicein order to capture context viaContextSnapshotwhen a task is submitted, and propagate context to the task when it is executed.Registry that provides access to, instances ofContextAccessorandThreadLocalAccessor.Wraps aScheduledExecutorServicein order to capture context viaContextSnapshotwhen a task is submitted, and propagate context to the task when it is executed.Holds values extracted fromThreadLocaland other types of context and exposes methods to propagate those values.An object to use to resetThreadLocalvalues at the end of a context scope.Factory for creatingContextSnapshotobjects and restoringThreadLocalvalues using a context object for which aContextAccessorexists in theContextRegistry.Builder forContextSnapshotFactoryinstances.Deprecated.Deprecated.UseNullMarkedinstead.Deprecated.UseNullableinstead.Contract to assist with setting and clearing aThreadLocal.
NullMarkedinstead.