TenantStreamsClosing Class
Deletes the streams a released tenant's receivers created, and the events queued on them.
public sealed class TenantStreamsClosing : Abblix.Oidc.Server.Features.MultiTenancy.ITenantClosingInheritance System.Object → TenantStreamsClosing
Implements ITenantClosing
Remarks
Runs through the released tenant's own transmitter, in the definition last served for that creation, so it reaches that creation's streams in the store they were kept in and no other's: a tenant created again under the same id keeps its own. Each stream is deleted on its own, so one that fails is logged, the others are still deleted and the tenant is reported not closed; once the token is canceled, the streams and tenants not reached are left and reported. The transmitters are resolved when a tenant is closed rather than when the catalog of tenants is built, since they depend on that catalog.
Constructors
TenantStreamsClosing(ILogger<TenantStreamsClosing>, IServiceProvider) Constructor
Deletes the streams a released tenant's receivers created, and the events queued on them.
public TenantStreamsClosing(Microsoft.Extensions.Logging.ILogger<Abblix.Oidc.Server.SharedSignals.TenantStreamsClosing> logger, System.IServiceProvider serviceProvider);Parameters
logger Microsoft.Extensions.Logging.ILogger<TenantStreamsClosing>
Records a stream that could not be deleted.
serviceProvider System.IServiceProvider
Resolves the transmitter of each tenant.
Remarks
Runs through the released tenant's own transmitter, in the definition last served for that creation, so it reaches that creation's streams in the store they were kept in and no other's: a tenant created again under the same id keeps its own. Each stream is deleted on its own, so one that fails is logged, the others are still deleted and the tenant is reported not closed; once the token is canceled, the streams and tenants not reached are left and reported. The transmitters are resolved when a tenant is closed rather than when the catalog of tenants is built, since they depend on that catalog.
Methods
TenantStreamsClosing.CloseAsync(IReadOnlyCollection<TenantDefinition>, CancellationToken) Method
Lets go of what each of tenants kept, each one on its own, so one that fails leaves the others closed.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition,System.Exception>> CloseAsync(System.Collections.Generic.IReadOnlyCollection<Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition> tenants, System.Threading.CancellationToken cancellationToken);Parameters
tenants System.Collections.Generic.IReadOnlyCollection<TenantDefinition>
The tenants released, each in the creation that was served.
cancellationToken System.Threading.CancellationToken
Cancels the closing.
Implements CloseAsync(IReadOnlyCollection<TenantDefinition>, CancellationToken)
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<TenantDefinition,System.Exception>>
Why each tenant that could not be closed, wholly or in part, was not, by the definition it was handed
in; the others are closed.