Class SettableContextStorageProvider
java.lang.Object
io.opentelemetry.sdk.testing.context.SettableContextStorageProvider
- All Implemented Interfaces:
io.opentelemetry.context.ContextStorageProvider
public final class SettableContextStorageProvider
extends Object
implements io.opentelemetry.context.ContextStorageProvider
A
ContextStorageProvider which can have it's ContextStorage set at any time.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.opentelemetry.context.ContextStorageget()static io.opentelemetry.context.ContextStorageReturns the currentContextStorage.static voidsetContextStorage(io.opentelemetry.context.ContextStorage storage) Sets theContextStorageto use for future context operations.
-
Constructor Details
-
SettableContextStorageProvider
public SettableContextStorageProvider()
-
-
Method Details
-
get
public io.opentelemetry.context.ContextStorage get()- Specified by:
getin interfaceio.opentelemetry.context.ContextStorageProvider
-
setContextStorage
public static void setContextStorage(io.opentelemetry.context.ContextStorage storage) Sets theContextStorageto use for future context operations. -
getContextStorage
public static io.opentelemetry.context.ContextStorage getContextStorage()Returns the currentContextStorage.
-