Table of Contents

Interface ITenantStoreResolver<TStore>

Namespace
Excalibur.Data.Sharding
Assembly
Excalibur.Data.Abstractions.dll

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

TStore

The 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

tenantId string

The 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.