Package io.smallrye.context.storage.impl
Class DefaultStorageManager
- java.lang.Object
-
- io.smallrye.context.storage.impl.DefaultStorageManager
-
- All Implemented Interfaces:
StorageManager
public class DefaultStorageManager extends Object implements StorageManager
Default implementation which allocates new regular ThreadLocal for any storage declaration class.
-
-
Constructor Summary
Constructors Constructor Description DefaultStorageManager()
-
Method Summary
Modifier and Type Method Description <T extends StorageDeclaration<X>,X>
ThreadLocal<X>getThreadLocal(Class<T> klass)Returns a regular ThreadLocal specific for the given storage declaration.
-
-
-
Method Detail
-
getThreadLocal
public <T extends StorageDeclaration<X>,X> ThreadLocal<X> getThreadLocal(Class<T> klass)
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
-
-