Interface RepositoryProvider
- All Known Implementing Classes:
DefaultRepositoryProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Provides access to a singleton-style repository for a given class type.
This interface is commonly used to retrieve long-lived, in-memory or cache-backed data structures that are
scoped to a FluxCapacitor
instance. Repositories are typically used to
model shared application state, pre-loaded caches, or instance-specific registries.
-
Method Summary
Modifier and TypeMethodDescriptiongetRepository
(Class<T> repositoryClass) Returns a repository (typically a shared, type-scoped map) for the given class type.
-
Method Details
-
getRepository
Returns 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.- 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
-