.NET API
JobTenantCap
Tracon.Abstractions.dllA ceiling on how many jobs of a set of handler keys one tenant may hold leased at the same time.
public sealed record JobTenantCap : IEquatable<JobTenantCap>- Inheritance
- object ← JobTenantCap
- Implements
- IEquatable<JobTenantCap>
- Inherited Members
- object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The store counts the tenant’s jobs whose handler key is in JobTenantCap.HandlerKeys and whose lease is alive (JobStatus.Leased or JobStatus.Running with a lease that has not expired), across every worker that shares the store. A tenant at the ceiling has its jobs of those keys skipped, and the oldest job that is still eligible is leased instead. A job of another handler key, or of another tenant, is never affected.
The ceiling is soft. Two workers that lease at the same moment can both read a count below the ceiling, so the tenant can exceed it by up to the number of workers leasing at once. It is a fairness limit that keeps one tenant from holding the whole queue, not a quota.
Constructors
Section titled “Constructors”JobTenantCap()
Section titled “ JobTenantCap()”public JobTenantCap()Properties
Section titled “Properties”HandlerKeys
Section titled “ HandlerKeys”Gets the handler keys the ceiling applies to (see JobHandlerKeys). Not empty.
public required IReadOnlyList<string> HandlerKeys { get; init; }Property Value
Section titled “Property Value”MaxLeasedPerTenant
Section titled “ MaxLeasedPerTenant”Gets the most jobs of JobTenantCap.HandlerKeys one tenant may hold leased. At least one.
public required int MaxLeasedPerTenant { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(JobTenantCap?)
Section titled “ Equals(JobTenantCap?)”public bool Equals(JobTenantCap? other)Parameters
Section titled “Parameters”other JobTenantCap?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(JobTenantCap?, JobTenantCap?)
Section titled “ operator ==(JobTenantCap?, JobTenantCap?)”public static bool operator ==(JobTenantCap? left, JobTenantCap? right)Parameters
Section titled “Parameters”left JobTenantCap?
right JobTenantCap?
Returns
Section titled “Returns”operator !=(JobTenantCap?, JobTenantCap?)
Section titled “ operator !=(JobTenantCap?, JobTenantCap?)”public static bool operator !=(JobTenantCap? left, JobTenantCap? right)Parameters
Section titled “Parameters”left JobTenantCap?
right JobTenantCap?