Table of Contents

TShardPoolProvider Class

Keeps one lazily-created connection pool per shard.

Remarks

Pools are created on first access through the IShardPoolFactory and cached by shard id. Pool creation happens outside the provider lock, so one slow shard cannot block lookups for the others. Pools can be removed at runtime (for example, after rotating shard credentials) with RemovePool: connections in use keep the removed pool alive until they are released, while new requests get a freshly created pool.

Syntax

Unit: Aurelius.Tenancy.Provider

TShardPoolProvider = class(TObject);

Constructors

Methods

Name Description
Clear Drops all cached shard pools.
GetPool Returns the connection pool of a shard, creating it on first access.
RemovePool Drops the cached pool of a shard, so a new pool is created on next access.