Skip to content

InMemoryVoiceSessionStore

Namespace AgentPrism · Assembly AgentPrism.Core.dll

The default implementation that keeps voice records in process memory.

public sealed class InMemoryVoiceSessionStore : IVoiceSessionStore

objectInMemoryVoiceSessionStore

IVoiceSessionStore

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

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.

public InMemoryVoiceSessionStore()

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)

tenantId string

The tenant.

query VoiceSessionQuery

The filter.

cancellationToken CancellationToken

The cancellation token.

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)

record VoiceSessionRecord

The record.

cancellationToken CancellationToken

The cancellation token.

ValueTask

The completion task.