Skip to main content

AdapterPoolQueueEntryDto

Namespace: Meshmakers.Octo.Communication.Contracts.DataTransferObjects

One entry of an adapter pool's queue, as every surface reads it โ€” GET {tenantId}/v1/adapterPool/{adapterPoolRtId}/queue (AB#4924, increments 7 and 8).

public class AdapterPoolQueueEntryDto

Inheritance Object โ†’ AdapterPoolQueueEntryDto

Remarks:

๐Ÿ”ด There is no global rank field, and adding one would be a lie. The pool serves borrowing tenants round-robin, so the only truthful answer is the pair AdapterPoolQueueEntryDto.PositionInTenant + AdapterPoolQueueEntryDto.TenantsAheadInRotation: where this item sits inside its own tenant's queue, and how many other tenants take a turn first. A single number would contradict the order work actually runs in (concept ยง5 "Fairness", implementation plan ยง9.2).

๐Ÿ”ด Mirrors the controller's own Models/AdapterPoolQueueEntryDto one-to-one. It is a separate declaration rather than a shared one because the controller does not take this package for its own response models; keep the two in step when either changes.

A GraphQL query cannot serve this shape: the two position numbers are the scheduler's rotation cursor โ€” process state, not entity state โ€” and the entries span tenant databases, the pool belonging to the lender and every execution to a borrower.

Propertiesโ€‹

ExecutionIdโ€‹

The borrower's execution id.

public string ExecutionId { get; set; }

Property Valueโ€‹

String

BorrowerTenantIdโ€‹

The tenant whose work this is.

public string BorrowerTenantId { get; set; }

Property Valueโ€‹

String

PipelineRtIdโ€‹

RtId of the pipeline to run, when the association resolves.

public string PipelineRtId { get; set; }

Property Valueโ€‹

String

PipelineNameโ€‹

Display name of that pipeline.

public string PipelineName { get; set; }

Property Valueโ€‹

String

ExecutionClassโ€‹

0 Interactive, 1 Batch. Interactive is served first within this tenant's turn and has no effect at all across tenants. An int and not an enum for the same reason as NodeDescriptorDto.ExecutionClass: a value the reading side does not know must deserialize rather than throw.

public int ExecutionClass { get; set; }

Property Valueโ€‹

Int32

QueuedAtUtcโ€‹

When the work item entered the queue.

public DateTime QueuedAtUtc { get; set; }

Property Valueโ€‹

DateTime

PositionInTenantโ€‹

1-based position inside this tenant's own queue; 0 once the item is leased.

public int PositionInTenant { get; set; }

Property Valueโ€‹

Int32

TenantsAheadInRotationโ€‹

How many other borrowing tenants with queued work are served before this tenant's next turn; 0 once the item is leased.

public int TenantsAheadInRotation { get; set; }

Property Valueโ€‹

Int32

LeasedOnMemberIdโ€‹

The pool member holding this item, or null while it waits. Nothing enforces referential integrity on this value โ€” it may name a process that no longer exists (implementation plan ยง12.1) โ€” so render it, never resolve it.

public string LeasedOnMemberId { get; set; }

Property Valueโ€‹

String

LeaseExpiresAtUtcโ€‹

When the holding lease expires; null while the item waits.

public Nullable<DateTime> LeaseExpiresAtUtc { get; set; }

Property Valueโ€‹

Nullable<DateTime>

IsLeasedโ€‹

Whether this entry is already running on a pool member. A leased entry cannot be cancelled through the queue verb โ€” that would be interrupting a running pipeline, a different operation (concept ยง5 "Cancellation").

public bool IsLeased { get; }

Property Valueโ€‹

Boolean

Remarks:

Derived, and kept off the wire: the controller serialises this same type, and a computed member would add a field to the response that says nothing the caller cannot read from AdapterPoolQueueEntryDto.LeasedOnMemberId.

Constructorsโ€‹

AdapterPoolQueueEntryDto()โ€‹

public AdapterPoolQueueEntryDto()