Interface ITenantStoreResolver<TStore>
Resolves a store instance for the specified tenant, using the shard map to route to the correct data store.
public interface ITenantStoreResolver<out TStore>
Type Parameters
TStoreThe store abstraction type (e.g.,
IEventStore,IProjectionStore<T>).
Remarks
Implementations should cache store instances per shard ID to avoid
creating new connections on every call. Typical implementation uses
ConcurrentDictionary<string, TStore> keyed by shard ID.
Methods
Resolve(string)
Resolves the store instance for the specified tenant.
TStore Resolve(string tenantId)
Parameters
tenantIdstringThe tenant identifier.
Returns
- TStore
The store instance routed to the tenant's shard.
Exceptions
- TenantShardNotFoundException
Thrown when the tenant cannot be resolved to a shard.