AbstractNumber of invalidation events currently retained in the circular ring buffer.
Latest monotonic sequence number assigned to a cache invalidation event in this process.
Maximum number of invalidation events held in the circular ring buffer.
Unique identifier of the running MJServer process, emitted in X-MJ-Server-ID.
AbstractTopologyIdentifier for the active broadcast topology.
Configures the provider instance with buffer sizing, entity exclusions, and cloud settings.
Optionalconfig: CacheBroadcastProviderConfigEvaluates whether user has entity-level read permission for payload, memoized by
(payload, entityName, roleFingerprint) so $N$ subscribers sharing $R$ role combinations
only run GetUserPermisions $R$ times per event.
OptionalentityLookup: (entityName: string) => EntityInfoReturns all permission-allowed, RLS-shaped invalidation events strictly after sinceSequence
for user. If sinceSequence has already been evicted from the ring buffer (or lies in the
future due to a server restart), sets RequiresFullRefresh: true and returns an empty Events list.
Computes a canonical, order-independent role fingerprint for a user (RoleHolder).
Memoized per user object in a WeakMap so repeated evaluations across thousands of events are $O(1)$.
AbstractNegotiateNegotiates a client broadcast connection (URL, token, and authorized role-bucket groups) for the given authenticated user.
OptionaldefaultGraphQLWsUrl: stringProtected AbstractOnHook invoked after an invalidation event is sequenced and stored in the ring buffer. Cloud multiplexer providers override this to forward role-bucketed payloads to their external pub/sub infrastructure.
Evaluates whether every read permission the user holds on entity is gated by a
Row-Level Security filter (ReadRLSFilterID).
Assigns the next monotonic sequence number to payload (if not already stamped on this server),
appends it to the bounded circular ring buffer, and invokes OnInvalidationRecorded for
provider-specific fan-out.
Resets the sequence counter and ring buffer. Intended for unit tests.
Resolves and caches the EntityInfo for a CacheInvalidationPayload so that
CacheInvalidationFilter and CacheInvalidationResolver do not repeat metadata lookups.
OptionalentityLookup: (entityName: string) => EntityInfoShapes a CacheInvalidationPayload into a CacheInvalidationNotification for user and entity.
When user and entity are present and user.UserRoles is populated, the shaped object is
memoized per (payload, entity, roleFingerprint) so $N$ subscribers sharing $R$ role buckets
only allocate and evaluate ReadIsRowFiltered $R$ times per event.
Returns whether invalidation events for entityName should be broadcast to clients.
Returns false for blank names or entities explicitly listed in excludedEntities.
Abstract base class for MemberJunction's pluggable Cache Invalidation Broadcast Hierarchy.
Provides the shared primitives used by all broadcast topologies:
Sequenceinteger and stored in a bounded circular buffer (MaxRingBufferSize), enabling HTTPX-MJ-Cache-Seqpiggybacking andGetCacheInvalidationsSincedelta catch-up.RoleIDs (cached perUserInfoin aWeakMap) and memoizes entity read-permission checks (CanRead) and row-level security key-withholding (ReadIsRowFiltered) once per(payload, entity, roleFingerprint)tuple instead of once per connected WebSocket client.AzureWebPubSubBroadcastProvider,AWSIoTCoreBroadcastProvider,GCPPubSubBroadcastProvider) overridePublishInvalidationandNegotiateClientConnectionto offload WebSocket fan-out to managed cloud pub/sub infrastructure.