Skip to content
Tracon

JobLeaseRequest

Namespace Tracon · Assembly Tracon.Abstractions.dll

What a worker asks of IJobStore.LeaseAsync: who it is, how long the lease lasts, which lanes it serves and, optionally, a per-tenant ceiling.

public sealed record JobLeaseRequest : IEquatable<JobLeaseRequest>
Inheritance
object ← JobLeaseRequest
Implements
IEquatable<JobLeaseRequest>
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

A record, so a new option is a new property with a default and not a new parameter on the interface method that every IJobStore implementation overrides.

public JobLeaseRequest()

Gets the lanes the lease is restricted to (see JobLanes). null or empty applies no filter: a job from any lane may be leased.

public IReadOnlyList<string>? Lanes { get; init; }

IReadOnlyList<string>?

Gets the lease’s validity duration.

public required TimeSpan LeaseDuration { get; init; }

TimeSpan

Gets the leasing worker’s identifier.

public required string Owner { get; init; }

string

Gets the per-tenant ceiling, or null (the default) for none: the oldest ready job is leased whichever tenant it belongs to.

public JobTenantCap? TenantCap { get; init; }

JobTenantCap?

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(JobLeaseRequest? other)

other JobLeaseRequest?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(JobLeaseRequest?, JobLeaseRequest?)

Section titled “ operator ==(JobLeaseRequest?, JobLeaseRequest?)”
public static bool operator ==(JobLeaseRequest? left, JobLeaseRequest? right)

left JobLeaseRequest?

right JobLeaseRequest?

bool

operator !=(JobLeaseRequest?, JobLeaseRequest?)

Section titled “ operator !=(JobLeaseRequest?, JobLeaseRequest?)”
public static bool operator !=(JobLeaseRequest? left, JobLeaseRequest? right)

left JobLeaseRequest?

right JobLeaseRequest?

bool