Zum Hauptinhalt springen

AdapterPoolServiceCollectionExtensions

Namespace: Meshmakers.Octo.Sdk.Common.Adapters

Turns an adapter host into an adapter pool member (AB#4924, increment 6).

public static class AdapterPoolServiceCollectionExtensions

Inheritance Object → AdapterPoolServiceCollectionExtensions

Methods​

AddAdapterPoolMember(IServiceCollection)​

Registers the lease-aware tenant scope, the management connection and the pool client.

public static IServiceCollection AddAdapterPoolMember(IServiceCollection services)

Parameters​

services IServiceCollection

Returns​

IServiceCollection

Remarks:

🔴 Call this before AddDataPipeline(). The pipeline registration uses TryAddSingleton for , so whichever of the two runs first wins — and for a pool member the winner must be . Registering the dedicated scope in a pool member would not fail anywhere: it would simply never enforce the lease, and every execution would look fine.

Being a pool member is a property of the image, not of a flag. This is an explicit call in a host's composition root rather than a bindable switch, for the same reason AdapterTenantScope.IsPoolMember is hard-coded false: a process that was not built as a pool member must not be able to become one by environment variable.

Participants (IAdapterLeaseParticipant) are added by the host on top — the SDK cannot see the caches an adapter repository owns, and that is exactly where the tenant-scoped state lives.