TTenantPoolProvider.Create Constructor
Overloads
- TTenantPoolProvider.Create(ITenantCatalog, IShardPoolFactory)
- TTenantPoolProvider.Create(ITenantCatalog, TShardPoolFactoryFunc)
- TTenantPoolProvider.Create(TTenantRoutingCache, TShardPoolProvider, Boolean)
TTenantPoolProvider.Create(ITenantCatalog, IShardPoolFactory)
Creates a new TTenantPoolProvider over a catalog, with its own routing cache and shard pool provider.
Syntax
Unit: Aurelius.Tenancy.Provider
constructor TTenantPoolProvider.Create(ACatalog: ITenantCatalog; AShardPoolFactory: IShardPoolFactory);
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| ACatalog | ITenantCatalog | The catalog providing tenant and shard information. | |
| AShardPoolFactory | IShardPoolFactory | The factory that creates the pool of a shard. |
See also
TTenantPoolProvider.Create(ITenantCatalog, TShardPoolFactoryFunc)
Creates a new TTenantPoolProvider over a catalog, using an anonymous function to create shard pools.
Syntax
Unit: Aurelius.Tenancy.Provider
constructor TTenantPoolProvider.Create(ACatalog: ITenantCatalog; AShardPoolFactory: TShardPoolFactoryFunc);
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| ACatalog | ITenantCatalog | The catalog providing tenant and shard information. | |
| AShardPoolFactory | TShardPoolFactory​Func | The function that creates the pool of a shard. |
See also
TTenantPoolProvider.Create(TTenantRoutingCache, TShardPoolProvider, Boolean)
Creates a new TTenantPoolProvider over existing cache and shard pool provider objects.
Remarks
Use this constructor to share one cache or one set of shard pools between several providers, for example to give background workers a separate set of pools over the same catalog.
Syntax
Unit: Aurelius.Tenancy.Provider
constructor TTenantPoolProvider.Create(ACache: TTenantRoutingCache; AShardPools: TShardPoolProvider; AOwnsObjects: Boolean = True);
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| ACache | TTenantRoutingCache | The routing cache to read tenant and shard information from. | |
| AShardPools | TShardPoolProvider | The provider of shard connection pools. | |
| AOwnsObjects | Boolean | Optional: Default value is True If True, the provider destroys ACache and AShardPools when it is destroyed. |