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
Methods
AddAsync<TSequence>(TSequence)
Adds the specified sequence to the store.
ValueTask<TSequence> AddAsync<TSequence>(TSequence sequence) where TSequence : class, ISequence
Parameters
sequenceTSequenceThe sequence to be added.
Returns
- ValueTask<TSequence>
A Task<TResult> representing the asynchronous operation. The task result contains the ISequence instance.
Type Parameters
TSequenceThe 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
sequenceIdstringThe sequence identifier.
matchPrefixboolEnables 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
TSequenceThe 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
includeUnboundedboolA value indicating whether the Silverback.Messaging.Sequences.Unbounded.UnboundedSequence instances have to be returned as well.
includeChildrenboolA 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
sequenceIdstringThe sequence identifier.