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 aFastThreadContextProviderif your context is usingStorageManagerto obtain its ThreadLocal, in which case we can obtain it from there to propagate it, if we know itsStorageDeclaration.
-
-
Method Summary
Modifier and Type Method Description Class<Declaration>getStorageDeclaration()default ThreadLocal<?>threadLocal(Map<String,String> props)Designates the ThreadLocal that we should capture/restore.-
Methods inherited from interface io.smallrye.context.FastThreadContextProvider
clearedValue
-
-
-
-
Method Detail
-
threadLocal
default ThreadLocal<?> threadLocal(Map<String,String> props)
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.
-
-