Table of Contents

Interface ISequenceStore

Namespace
Silverback.Messaging.Sequences
Assembly
Silverback.Integration.dll

The temporary store for the sequences being consumed.

public interface ISequenceStore : IReadOnlyCollection<ISequence>, IEnumerable<ISequence>, IEnumerable, IAsyncDisposable, IDisposable
Inherited Members

Properties

IsDisposed

Gets a value indicating whether the store has been disposed.

bool IsDisposed { get; }

Property Value

bool

Methods

AddAsync<TSequence>(TSequence)

Adds the specified sequence to the store.

ValueTask<TSequence> AddAsync<TSequence>(TSequence sequence) where TSequence : class, ISequence

Parameters

sequence TSequence

The sequence to be added.

Returns

ValueTask<TSequence>

A Task<TResult> representing the asynchronous operation. The task result contains the ISequence instance.

Type Parameters

TSequence

The type of the sequence to be added.

GetAsync<TSequence>(string, bool)

Gets the sequence with the specified id.

ValueTask<TSequence?> GetAsync<TSequence>(string sequenceId, bool matchPrefix = false) where TSequence : class, ISequence

Parameters

sequenceId string

The sequence identifier.

matchPrefix bool

Enables sequence id prefix matching (String.StartsWith).

Returns

ValueTask<TSequence>

A Task<TResult> representing the asynchronous operation. The task result contains the ISequence instance.

Type Parameters

TSequence

The type of the sequence to be retrieved.

GetPendingSequences(bool, bool)

Returns the pending sequences currently in the store.

IReadOnlyCollection<ISequence> GetPendingSequences(bool includeUnbounded = false, bool includeChildren = false)

Parameters

includeUnbounded bool

A value indicating whether the Silverback.Messaging.Sequences.Unbounded.UnboundedSequence instances have to be returned as well.

includeChildren bool

A value indicating whether the child sequences have to be returned as well (e.g., a chunk sequence inside a batch sequence).

Returns

IReadOnlyCollection<ISequence>

The collection of sequences.

RemoveAsync(string)

Removes the sequence with the specified id.

ValueTask RemoveAsync(string sequenceId)

Parameters

sequenceId string

The sequence identifier.

Returns

ValueTask

A Task representing the asynchronous operation.