Package io.smallrye.context.storage.impl
Class DefaultStorageManager
java.lang.Object
io.smallrye.context.storage.impl.DefaultStorageManager
- All Implemented Interfaces:
StorageManager
Default implementation which allocates new regular ThreadLocal for any storage declaration class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends StorageDeclaration<X>,X>
ThreadLocal<X>getThreadLocal(Class<T> klass) Returns a regular ThreadLocal specific for the given storage declaration.
-
Constructor Details
-
DefaultStorageManager
public DefaultStorageManager()
-
-
Method Details
-
getThreadLocal
Returns a regular ThreadLocal specific for the given storage declaration.- Specified by:
getThreadLocalin interfaceStorageManager- Type Parameters:
T- The StorageDeclaration typeX- The type of data we store in that ThreadLocal- Parameters:
klass- the declaration class which defines the type of item we want to store in the required ThreadLocal- Returns:
- the ThreadLocal, memoized
-