Table of Contents

TCustomTenantCatalog Class

Base class for ITenantCatalog implementations.

Remarks

Only FindTenant is abstract. The other lookup methods return "unknown" by default and the write methods raise ENotSupportedException, so a minimal read-only catalog (for example, a client to a remote catalog service) only needs to override FindTenant, and optionally FindShard and GetShards.

Syntax

Unit: Aurelius.Tenancy.Catalog

TCustomTenantCatalog = class(TInterfacedObject, ITenantCatalog);

Methods

Name Description
FindShard Returns the catalog record of a shard. The default implementation always returns an empty record, meaning the shard is not tracked and is treated as active.
FindTenant Returns the catalog record of a tenant, or an empty record if the tenant is unknown. Must be implemented by descendants.
FindTenantBy​Identifier Returns the tenant associated with an external identifier. The default implementation always returns an empty record.
GetShards Returns all registered shards. The default implementation returns an empty array.
RemoveIdentifier Removes an external identifier. The default implementation raises ENotSupportedException.
SaveIdentifier Associates an external identifier with a tenant. The default implementation raises ENotSupportedException.
SaveShard Creates or updates a shard record. The default implementation raises ENotSupportedException.
SaveTenant Creates or updates a tenant record. The default implementation raises ENotSupportedException.