A pure interface for a context with a notion of a current span.
#include <bmqpi_dtcontext.h>
◆ ~DTContext()
| virtual BloombergLP::bmqpi::DTContext::~DTContext |
( |
| ) |
|
|
virtual |
◆ span()
| virtual bsl::shared_ptr< bmqpi::DTSpan > BloombergLP::bmqpi::DTContext::span |
( |
| ) |
const |
|
pure virtual |
Returns the current DTSpan for the calling thread according to this DTContext, or an empty shared_ptr if no span is currently set.
◆ scope()
| virtual bslma::ManagedPtr< void > BloombergLP::bmqpi::DTContext::scope |
( |
const bsl::shared_ptr< DTSpan > & |
newSpan | ) |
|
|
pure virtual |
Letting previous = span() on some thread T, returns an object token which promises:
span() will return newSpan when called on thread T, following the construction of token.
span() will return previous when called on thread T, following the destruction of token.
Note that if token2 = scope(otherSpan) is called on thread T during the lifetime of token, then span() will return otherSpan. After token2 is destroyed, it will again return newSpan.
The documentation for this class was generated from the following file: