TWeightedHashShardAllocator.AllocateShard Method
Returns the active shard selected by the weighted hash of the tenant id.
Syntax
Unit: Aurelius.Tenancy.Provisioning
function TWeightedHashShardAllocator.AllocateShard(const Tenant: TTenantInfo; const Shards: TArray<TShardInfo>): string;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | Tenant | TTenantInfo | The tenant being provisioned. |
| const | Shards | TArray<TShardInfo> | The registered shards. |
Returns
The id of the chosen shard, or an empty string if there is no active shard.