ArchiveSnapshot
Namespace: Meshmakers.Octo.Runtime.Contracts.StreamData
Read-only snapshot of the parts of a CkArchive entity the lifecycle service needs.
Intentionally narrower than the full RtEntity: the lifecycle decisions only depend on
ArchiveSnapshot.Status plus identification fields. Backend-specific stores translate from their
concrete representation to this record. Columns carries the user-configured archive
columns (path/indexed/required) the data-store provider needs to generate DDL — empty when the
archive only has the standard time-series columns.
public record ArchiveSnapshot : IEquatable<ArchiveSnapshot>
Inheritance Object → ArchiveSnapshot
Implements IEquatable<ArchiveSnapshot>
Properties
RtId
public OctoObjectId RtId { get; set; }
Property Value
OctoObjectId
TargetCkTypeId
public RtCkId<CkTypeId> TargetCkTypeId { get; set; }
Property Value
RtCkId<CkTypeId>
Status
public CkArchiveStatus Status { get; set; }
Property Value
RtWellKnownName
public string RtWellKnownName { get; set; }
Property Value
Columns
public IReadOnlyList<CkArchiveColumnSpec> Columns { get; set; }
Property Value
IReadOnlyList<CkArchiveColumnSpec>
RollupAggregations
When this snapshot represents a RollupArchive, the aggregation specs from which
ArchiveSnapshot.Columns were derived (via RollupColumnGenerator). Null for raw
and time-range archives. The DDL path uses this to skip CK-type attribute resolution for
rollups — the derived column names (e.g. temperature_avg_sum) are storage
identifiers, not paths into the CK type, so the column SQL type is determined by the
aggregation function instead. Concept §4.
public IReadOnlyList<CkRollupAggregationSpec> RollupAggregations { get; set; }
Property Value
IReadOnlyList<CkRollupAggregationSpec>
IsTimeRange
True when this snapshot represents a TimeRangeArchive — each row carries an
explicit [window_start, window_end) instead of a single timestamp. The DDL
path emits two timestamp columns + a was_updated flag column, and the natural key
becomes (window_start, window_end, rtid, ckTypeId). Concept §4 + §6.
public bool IsTimeRange { get; set; }
Property Value
Remarks:
Discriminator semantics: ArchiveSnapshot.RollupAggregations non-null ⇒ rollup; ArchiveSnapshot.IsTimeRange true ⇒ time-range; both false ⇒ raw archive. Rollups and time-range archives are mutually exclusive at the storage shape level (a rollup snapshot has IsTimeRange = false today; the rollup-on-time-range unification ships in Phase 7).
Period
The archive's native window length (e.g. 15 min, 1 h, 1 d): a TimeRangeArchive's
declared window Period, or a RollupArchive's BucketSize. Null for raw
archives, whose sampling interval is undeclared. For time-range ingestion it stays advisory
(the engine does not enforce that incoming windows match it); it is authoritative for the
AB#4289 rollup activation guard (a rollup's bucket must be a multiple of its source's window
length) and feeds the AB#4290 resolver's base-rung grain.
public Nullable<TimeSpan> Period { get; set; }
Property Value
UsesWindowedStorage
True when this snapshot's storage shape is the windowed
(window_start, window_end, rtid, ckTypeId) + was_updated layout — i.e. either
a rollup archive (Phase 7 unification) or a time-range archive. False ⇒ raw archive with
the single timestamp column. Concept-time-range §4 / §6.
public bool UsesWindowedStorage { get; }
Property Value
MaxRetroactiveReachMs
Bounded retro reach (AB#4196): the maximum distance in milliseconds before the
consumed watermark that a single retroactive write to this archive may drag an
automatic recompute of its dependent rollups. null ⇒ unbounded (the pre-1.6.8
behaviour). The effective cap combines this with the host
StreamData:Recompute:MaxRetroactiveReachHardLimitMs ceiling. Only bounds the automatic
path; manual recomputeArchive / rewindRollupWatermark stay unbounded.
public Nullable<long> MaxRetroactiveReachMs { get; set; }
Property Value
Constructors
ArchiveSnapshot(OctoObjectId, RtCkId<CkTypeId>, CkArchiveStatus, String, IReadOnlyList<CkArchiveColumnSpec>)
Read-only snapshot of the parts of a CkArchive entity the lifecycle service needs.
Intentionally narrower than the full RtEntity: the lifecycle decisions only depend on
ArchiveSnapshot.Status plus identification fields. Backend-specific stores translate from their
concrete representation to this record. Columns carries the user-configured archive
columns (path/indexed/required) the data-store provider needs to generate DDL — empty when the
archive only has the standard time-series columns.
public ArchiveSnapshot(OctoObjectId RtId, RtCkId<CkTypeId> TargetCkTypeId, CkArchiveStatus Status, string RtWellKnownName, IReadOnlyList<CkArchiveColumnSpec> Columns)
Parameters
RtId OctoObjectId
TargetCkTypeId RtCkId<CkTypeId>
Status CkArchiveStatus
RtWellKnownName String