Package io.smallrye.context
Interface FastStorageThreadContextProvider<Declaration extends StorageDeclaration<?>>
- Type Parameters:
Declaration- The StorageDeclaration for that ThreadLocal
- All Superinterfaces:
FastThreadContextProvider,org.eclipse.microprofile.context.spi.ThreadContextProvider
public interface FastStorageThreadContextProvider<Declaration extends StorageDeclaration<?>>
extends FastThreadContextProvider
Special implementation of a
FastThreadContextProvider if your context is using StorageManager to obtain its
ThreadLocal, in which case we can obtain it from there to propagate it, if we know its StorageDeclaration.-
Method Summary
Modifier and TypeMethodDescriptiondefault ThreadLocal<?>threadLocal(Map<String, String> props) Designates the ThreadLocal that we should capture/restore.Methods inherited from interface io.smallrye.context.FastThreadContextProvider
clearedValueMethods inherited from interface org.eclipse.microprofile.context.spi.ThreadContextProvider
clearedContext, currentContext, getThreadContextType
-
Method Details
-
threadLocal
Description copied from interface:FastThreadContextProviderDesignates the ThreadLocal that we should capture/restore. Must always be the same returned ThreadLocal.- Specified by:
threadLocalin interfaceFastThreadContextProvider- Parameters:
props- properties- Returns:
- the ThreadLocal to capture/restore
-
getStorageDeclaration
Class<Declaration> getStorageDeclaration()- Returns:
- the
StorageDeclarationto use to obtain the ThreadLocal to propagate.
-