Interface ISequenceStore
The temporary store for the sequences being consumed.
Inherited Members
Namespace: Silverback.Messaging.Sequences
Assembly: Silverback.Integration.dll
Syntax
public interface ISequenceStore : IReadOnlyCollection<ISequence>, IEnumerable<ISequence>, IEnumerable, IAsyncDisposable, IDisposable
Methods
| Improve this doc View sourceAddAsync<TSequence>(TSequence)
Adds the specified sequence to the store.
Declaration
Task<TSequence> AddAsync<TSequence>(TSequence sequence) where TSequence : class, ISequence
Parameters
Type | Name | Description |
---|---|---|
TSequence | sequence | The sequence to be added. |
Returns
Type | Description |
---|---|
Task<TSequence> | A Task<TResult> representing the asynchronous operation. The task result contains the ISequence instance. |
Type Parameters
Name | Description |
---|---|
TSequence | The type of the sequence to be added. |
GetAsync<TSequence>(string, bool)
Gets the sequence with the specified id.
Declaration
Task<TSequence?> GetAsync<TSequence>(string sequenceId, bool matchPrefix = false) where TSequence : class, ISequence
Parameters
Type | Name | Description |
---|---|---|
string | sequenceId | The sequence identifier. |
bool | matchPrefix | Enables sequence id prefix matching (String.StartsWith). |
Returns
Type | Description |
---|---|
Task<TSequence> | A Task<TResult> representing the asynchronous operation. The task result contains the ISequence instance. |
Type Parameters
Name | Description |
---|---|
TSequence | The type of the sequence to be retrieved. |
GetPendingSequences(bool)
Returns the pending sequences currently in the store.
Declaration
IReadOnlyCollection<ISequence> GetPendingSequences(bool includeUnbounded = false)
Parameters
Type | Name | Description |
---|---|---|
bool | includeUnbounded | A value indicating whether the UnboundedSequence instances have to be returned as well. |
Returns
Type | Description |
---|---|
IReadOnlyCollection<ISequence> | The collection of sequences. |
RemoveAsync(string)
Removes the sequence with the specified id.
Declaration
Task RemoveAsync(string sequenceId)
Parameters
Type | Name | Description |
---|---|---|
string | sequenceId | The sequence identifier. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |