feat: implement SubscriptionIndex + JetStreamMemStore cluster — 39 features verified

Add SubscriptionIndex factory methods, notification wrappers, and
ValidateMapping. Implement 24 MemStore methods (TTL, scheduling, SDM,
age-check, purge/compact/reset) with JetStream header helpers and
constants. Verified features: 987 → 1026.
This commit is contained in:
Joseph Doherty
2026-02-27 06:19:47 -05:00
parent 4e61314c1c
commit ba4f41cf71
9 changed files with 897 additions and 8 deletions

View File

@@ -74,6 +74,21 @@ public sealed class StreamDeletionMeta
return false;
}
/// <summary>
/// Tries to get the pending entry for <paramref name="seq"/>.
/// </summary>
public bool TryGetPending(ulong seq, out SdmBySeq entry) => _pending.TryGetValue(seq, out entry);
/// <summary>
/// Sets the pending entry for <paramref name="seq"/>.
/// </summary>
public void SetPending(ulong seq, SdmBySeq entry) => _pending[seq] = entry;
/// <summary>
/// Returns the pending count for <paramref name="subj"/>, or 0 if not tracked.
/// </summary>
public ulong GetSubjectTotal(string subj) => _totals.TryGetValue(subj, out var cnt) ? cnt : 0;
/// <summary>
/// Clears all tracked data.
/// Mirrors <c>SDMMeta.empty</c>.