Table of Contents

Class InMemoryWorkflowHistoryGraphStore

Namespace
JD.AI.Workflows.History
Assembly
JD.AI.Workflows.dll
public sealed class InMemoryWorkflowHistoryGraphStore : IWorkflowHistoryGraphStore
Inheritance
InMemoryWorkflowHistoryGraphStore
Implements
Inherited Members

Methods

GetEdgesForWorkflowAsync(string, CancellationToken)

public Task<IReadOnlyList<WorkflowHistoryEdge>> GetEdgesForWorkflowAsync(string workflowName, CancellationToken ct = default)

Parameters

workflowName string
ct CancellationToken

Returns

Task<IReadOnlyList<WorkflowHistoryEdge>>

GetNodeAsync(string, CancellationToken)

public Task<WorkflowHistoryNode?> GetNodeAsync(string fingerprint, CancellationToken ct = default)

Parameters

fingerprint string
ct CancellationToken

Returns

Task<WorkflowHistoryNode>

GetTopEdgesFromAsync(string, int, CancellationToken)

public Task<IReadOnlyList<WorkflowHistoryEdge>> GetTopEdgesFromAsync(string fingerprint, int topN = 10, CancellationToken ct = default)

Parameters

fingerprint string
topN int
ct CancellationToken

Returns

Task<IReadOnlyList<WorkflowHistoryEdge>>

LoadAsync(CancellationToken)

public Task<WorkflowHistoryGraph> LoadAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<WorkflowHistoryGraph>

SaveAsync(WorkflowHistoryGraph, CancellationToken)

public Task SaveAsync(WorkflowHistoryGraph graph, CancellationToken ct = default)

Parameters

graph WorkflowHistoryGraph
ct CancellationToken

Returns

Task

SearchNodesAsync(string, int, CancellationToken)

public Task<IReadOnlyList<WorkflowHistoryNode>> SearchNodesAsync(string query, int limit = 20, CancellationToken ct = default)

Parameters

query string
limit int
ct CancellationToken

Returns

Task<IReadOnlyList<WorkflowHistoryNode>>

UpsertEdgeAsync(WorkflowHistoryEdge, CancellationToken)

public Task UpsertEdgeAsync(WorkflowHistoryEdge edge, CancellationToken ct = default)

Parameters

edge WorkflowHistoryEdge
ct CancellationToken

Returns

Task

UpsertNodeAsync(WorkflowHistoryNode, CancellationToken)

public Task UpsertNodeAsync(WorkflowHistoryNode node, CancellationToken ct = default)

Parameters

node WorkflowHistoryNode
ct CancellationToken

Returns

Task