InMemoryWorkflowDefinitionStore
AgentPrism.Core.dllStores workflow definitions in process memory.
public sealed class InMemoryWorkflowDefinitionStore : IWorkflowDefinitionStoreInheritance
Section titled “Inheritance”object ← InMemoryWorkflowDefinitionStore
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”Its behavior contract matches PostgresWorkflowDefinitionStore and is
protected by shared contract tests.
Constructors
Section titled “Constructors”InMemoryWorkflowDefinitionStore()
Section titled “ InMemoryWorkflowDefinitionStore()”public InMemoryWorkflowDefinitionStore()Methods
Section titled “Methods”DeleteAsync(string, string, CancellationToken)
Section titled “ DeleteAsync(string, string, CancellationToken)”Deletes the definition.
public ValueTask<bool> DeleteAsync(string tenantId, string name, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
name string
The workflow name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”true if the delete happened.
GetAsync(string, string, CancellationToken)
Section titled “ GetAsync(string, string, CancellationToken)”Fetches the definition with the given name.
public ValueTask<WorkflowDefinition?> GetAsync(string tenantId, string name, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
name string
The workflow name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<WorkflowDefinition?>
The definition; null if it does not exist.
ListAsync(string, CancellationToken)
Section titled “ ListAsync(string, CancellationToken)”Lists all of a tenant’s definitions, by name.
public ValueTask<IReadOnlyList<WorkflowDefinition>> ListAsync(string tenantId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<WorkflowDefinition>>
The definitions.
SaveAsync(string, WorkflowDefinition, CancellationToken)
Section titled “ SaveAsync(string, WorkflowDefinition, CancellationToken)”Saves the definition. The incoming WorkflowDefinition.Version
value is ignored; the store determines the version number.
public ValueTask<WorkflowDefinition> SaveAsync(string tenantId, WorkflowDefinition definition, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
definition WorkflowDefinition
The definition to save.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The definition with its version number assigned.