Interface ContextSnapshot


public interface ContextSnapshot
Holds values extracted from ThreadLocal and other types of context and exposes methods to propagate those values.

Use ContextSnapshotFactory.builder() to configure a factory to work with snapshots.

Implementations are disallowed to store null values. If a ThreadLocal is not set, or it's value is null, there is no way of distinguishing one from the other. In such a case, the ContextSnapshot simply must not contain a capture for the particular ThreadLocal. Implementations should filter out any null values after reading into the storage also obtained by calling ContextAccessor.readValues(Object, Predicate, Map), and should likewise ignore null values from ContextAccessor.readValue(Object, Object).

Since:
1.0.0