Class ClosesStreamAttribute

Namespace
Cratis.Chronicle.Events.Constraints
Assembly
Cratis.Chronicle.dll

Declares an event that closes a stream scope after its durable append.

[AttributeUsage(AttributeTargets.Class)]
public sealed class ClosesStreamAttribute : Attribute
Inheritance
ClosesStreamAttribute
Inherited Members
Extension Methods

Remarks

Registering a declaration is not retroactive. Closing happens in the same kernel grain turn as the append, but is not crash-atomic with it; an explicit reindex can repair a missing index update. Reopening removes only this constraint's exact closure, never an operator's manual closure. A reindex leaves this owner's rows untouched if a redacted property-sourced closing or reopening event has no recoverable scope in the existing closure snapshot. It logs the constraint and event position, then continues rebuilding other constraints; no reopening tombstones are retained.

Constructors

ClosesStreamAttribute()

public ClosesStreamAttribute()

Properties

Dimensions

Gets or sets the participating dimensions; defaults to event source, stream type and stream identifier.

public ClosedStreamDimensions Dimensions { get; set; }

Property Value

ClosedStreamDimensions

EventSequences

Gets or sets the event sequences this declaration applies to; empty means all sequences.

public string[] EventSequences { get; set; }

Property Value

string[]

EventStreamIdFrom

Gets or sets the payload property providing the stream identifier, implying that dimension.

public string? EventStreamIdFrom { get; set; }

Property Value

string

Name

Gets or sets the owning constraint name; defaults to the declaring event type's name.

public string? Name { get; set; }

Property Value

string

ReopenedBy

Gets or sets the event types that reopen this constraint's exact scope.

public Type[] ReopenedBy { get; set; }

Property Value

Type[]