Skip to content

InMemoryInboundTriggerStore

Namespace AgentPrism · Assembly AgentPrism.Core.dll

A store that keeps inbound trigger definitions in process memory (first class).

public sealed class InMemoryInboundTriggerStore : IInboundTriggerStore

objectInMemoryInboundTriggerStore

IInboundTriggerStore

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

Limits: process lifetime and a single node. Use a SQL provider in production. Its behavior contract matches SqlInboundTriggerStore exactly and shared contract tests protect it.

public InMemoryInboundTriggerStore()

DeleteAsync(string, string, CancellationToken)

Section titled “ DeleteAsync(string, string, CancellationToken)”

Deletes the trigger.

public ValueTask<bool> DeleteAsync(string tenantId, string name, CancellationToken cancellationToken = default)

tenantId string

The tenant identifier.

name string

The trigger name.

cancellationToken CancellationToken

The cancellation token.

ValueTask<bool>

true if the delete happened.

GetAsync(string, string, CancellationToken)

Section titled “ GetAsync(string, string, CancellationToken)”

Fetches the trigger with the given name.

public ValueTask<InboundTrigger?> GetAsync(string tenantId, string name, CancellationToken cancellationToken = default)

tenantId string

The tenant identifier.

name string

The trigger name.

cancellationToken CancellationToken

The cancellation token.

ValueTask<InboundTrigger?>

The trigger; null if it does not exist.

Lists all of a tenant’s triggers, by name.

public ValueTask<IReadOnlyList<InboundTrigger>> ListAsync(string tenantId, CancellationToken cancellationToken = default)

tenantId string

The tenant identifier.

cancellationToken CancellationToken

The cancellation token.

ValueTask<IReadOnlyList<InboundTrigger>>

The triggers.

UpsertAsync(InboundTrigger, CancellationToken)

Section titled “ UpsertAsync(InboundTrigger, CancellationToken)”

Creates or updates the trigger (name + tenant is unique).

public ValueTask<InboundTrigger> UpsertAsync(InboundTrigger trigger, CancellationToken cancellationToken = default)

trigger InboundTrigger

The trigger to save.

cancellationToken CancellationToken

The cancellation token.

ValueTask<InboundTrigger>

The saved trigger.