Class DeliveryId
- Namespace
- Cratis.Chronicle.Reactors
- Assembly
- Cratis.Chronicle.dll
Concept that represents the stable identity of the delivery of one event to one reactor partition.
public record DeliveryId : ConceptAs<string>, IComparable<ConceptAs<string>>, IComparable<string>, IComparable, IEquatable<ConceptAs<string>>, IEquatable<DeliveryId>
- Inheritance
-
DeliveryId
- Implements
- Inherited Members
- Extension Methods
Remarks
The value is the same every time the same event is delivered to the same reactor - the retry after a failed partition is recovered, and the re-delivery a replay performs - and different for every genuinely distinct delivery. That makes it the key to record a completed side effect under, so that a redelivery can recognize the work as already done.
It identifies the delivery, not the outcome. Chronicle never learns whether the side effect ran, so an identity on its own suppresses nothing - see ReactorDelivery for what it does and does not promise.
Constructors
DeliveryId(DeliveryId)
protected DeliveryId(DeliveryId original)
Parameters
originalDeliveryId
DeliveryId(string)
Concept that represents the stable identity of the delivery of one event to one reactor partition.
public DeliveryId(string Value)
Parameters
ValuestringActual value.
Remarks
The value is the same every time the same event is delivered to the same reactor - the retry after a failed partition is recovered, and the re-delivery a replay performs - and different for every genuinely distinct delivery. That makes it the key to record a completed side effect under, so that a redelivery can recognize the work as already done.
It identifies the delivery, not the outcome. Chronicle never learns whether the side effect ran, so an identity on its own suppresses nothing - see ReactorDelivery for what it does and does not promise.
Fields
NotSet
Gets the representation of an unset DeliveryId.
public static readonly DeliveryId NotSet
Field Value
Properties
EqualityContract
protected override Type EqualityContract { get; }
Property Value
Methods
Deconstruct(out string)
public void Deconstruct(out string Value)
Parameters
Valuestring
Equals(DeliveryId?)
public virtual bool Equals(DeliveryId? other)
Parameters
otherDeliveryId
Returns
Equals(ConceptAs<string>?)
public override sealed bool Equals(ConceptAs<string>? other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
Operators
operator ==(DeliveryId?, DeliveryId?)
public static bool operator ==(DeliveryId? left, DeliveryId? right)
Parameters
leftDeliveryIdrightDeliveryId
Returns
implicit operator DeliveryId(string)
Implicitly convert from a string to DeliveryId.
public static implicit operator DeliveryId(string id)
Parameters
idstringString to convert from.
Returns
operator !=(DeliveryId?, DeliveryId?)
public static bool operator !=(DeliveryId? left, DeliveryId? right)
Parameters
leftDeliveryIdrightDeliveryId