InMemoryVoiceSessionStore
AgentPrism.Core.dllThe default implementation that keeps voice records in process memory.
public sealed class InMemoryVoiceSessionStore : IVoiceSessionStoreInheritance
Section titled “Inheritance”object ← InMemoryVoiceSessionStore
Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”For single-process deployments and tests. When a SQL provider is enabled
with UsePostgreSql, UseSqlServer, or UseSqlite,
a persistent store replaces this one.
The record count has an upper limit. As voice connections open and close, an unbounded list would silently grow an in-memory deployment.
Constructors
Section titled “Constructors”InMemoryVoiceSessionStore()
Section titled “ InMemoryVoiceSessionStore()”public InMemoryVoiceSessionStore()Methods
Section titled “Methods”QueryAsync(string, VoiceSessionQuery, CancellationToken)
Section titled “ QueryAsync(string, VoiceSessionQuery, CancellationToken)”Lists a tenant’s voice session records, newest first.
public ValueTask<IReadOnlyList<VoiceSessionRecord>> QueryAsync(string tenantId, VoiceSessionQuery query, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant.
query VoiceSessionQuery
The filter.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<VoiceSessionRecord>>
The records.
SaveAsync(VoiceSessionRecord, CancellationToken)
Section titled “ SaveAsync(VoiceSessionRecord, CancellationToken)”Adds or updates a voice session record.
public ValueTask SaveAsync(VoiceSessionRecord record, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”record VoiceSessionRecord
The record.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The completion task.