Class DefaultRepositoryProvider
java.lang.Object
io.fluxzero.sdk.tracking.handling.DefaultRepositoryProvider
- All Implemented Interfaces:
RepositoryProvider
A default implementation of the
RepositoryProvider interface that uses a ConcurrentHashMap for each
repository.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRepository(Class<T> repositoryClass) Returns a repository (typically a shared, type-scoped map) for the given class type.
-
Constructor Details
-
DefaultRepositoryProvider
public DefaultRepositoryProvider()
-
-
Method Details
-
getRepository
Description copied from interface:RepositoryProviderReturns a repository (typically a shared, type-scoped map) for the given class type.The returned
Map<Object, T>is expected to be a singleton per type and reused across calls.- Specified by:
getRepositoryin interfaceRepositoryProvider- Type Parameters:
T- the type of objects stored in the repository- Parameters:
repositoryClass- the class representing the repository entry type- Returns:
- a shared map representing the repository for the given type
-