Class SequenceBase<TEnvelope>
Inheritance
System.Object
SequenceBase<TEnvelope>
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Silverback.Integration.dll
Syntax
public abstract class SequenceBase<TEnvelope> : ISequence, IDisposable where TEnvelope : IRawInboundEnvelope
Type Parameters
Name |
Description |
TEnvelope |
|
Constructors
|
Improve this doc
View source
SequenceBase(String, ConsumerPipelineContext, Boolean, Nullable<TimeSpan>, IMessageStreamProvider, Boolean)
Declaration
protected SequenceBase(string sequenceId, ConsumerPipelineContext context, bool enforceTimeout = true, TimeSpan? timeout = null, IMessageStreamProvider streamProvider = null, bool trackIdentifiers = true)
Parameters
Type |
Name |
Description |
System.String |
sequenceId |
The identifier that is used to match the consumed messages with their belonging sequence.
|
ConsumerPipelineContext |
context |
The current ConsumerPipelineContext, assuming that it will be the one from which the
sequence gets published to the internal bus.
|
System.Boolean |
enforceTimeout |
Specifies whether the timeout has to be enforced.
|
System.Nullable<System.TimeSpan> |
timeout |
The timeout to be applied. If not specified the value of Endpoint.Sequence.Timeout will be
used.
|
IMessageStreamProvider |
streamProvider |
The IMessageStreamProvider to be pushed. A new one will be created if not provided.
|
System.Boolean |
trackIdentifiers |
Specifies whether the message identifiers have to be collected, in order to be used for the commit
later on.
|
Properties
|
Improve this doc
View source
AbortException
Declaration
public Exception AbortException { get; }
Property Value
Type |
Description |
System.Exception |
|
|
Improve this doc
View source
AbortReason
Declaration
public SequenceAbortReason AbortReason { get; }
Property Value
|
Improve this doc
View source
Activity
Declaration
public Activity Activity { get; }
Property Value
Type |
Description |
System.Diagnostics.Activity |
|
|
Improve this doc
View source
Context
Declaration
public ConsumerPipelineContext Context { get; }
Property Value
|
Improve this doc
View source
IsAborted
Declaration
public bool IsAborted { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this doc
View source
IsBeingConsumed
Declaration
public bool IsBeingConsumed { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this doc
View source
IsComplete
Declaration
public bool IsComplete { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this doc
View source
IsCompleting
Declaration
public bool IsCompleting { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this doc
View source
IsNew
Declaration
public bool IsNew { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this doc
View source
IsPending
Declaration
public bool IsPending { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this doc
View source
Length
Declaration
public int Length { get; protected set; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this doc
View source
ParentSequence
Declaration
public ISequence ParentSequence { get; }
Property Value
|
Improve this doc
View source
ProcessingCompletedTask
Declaration
public Task ProcessingCompletedTask { get; }
Property Value
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this doc
View source
SequenceId
Declaration
public string SequenceId { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this doc
View source
SequencerBehaviorsTask
Declaration
public Task SequencerBehaviorsTask { get; }
Property Value
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this doc
View source
Sequences
Declaration
public IReadOnlyCollection<ISequence> Sequences { get; }
Property Value
Type |
Description |
System.Collections.Generic.IReadOnlyCollection<ISequence> |
|
|
Improve this doc
View source
ShouldCreateNewActivity
Declaration
public bool ShouldCreateNewActivity { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this doc
View source
StreamProvider
Declaration
public IMessageStreamProvider StreamProvider { get; }
Property Value
|
Improve this doc
View source
TotalLength
Declaration
public int? TotalLength { get; protected set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
Methods
|
Improve this doc
View source
AbortAsync(SequenceAbortReason, Exception)
Declaration
public Task AbortAsync(SequenceAbortReason reason, Exception exception = null)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this doc
View source
AddAsync(IRawInboundEnvelope, ISequence, Boolean)
Declaration
public Task<AddToSequenceResult> AddAsync(IRawInboundEnvelope envelope, ISequence sequence, bool throwIfUnhandled = true)
Parameters
Returns
|
Improve this doc
View source
AddCoreAsync(TEnvelope, ISequence, Boolean)
Adds the message to the sequence.
Declaration
protected virtual async Task<AddToSequenceResult> AddCoreAsync(TEnvelope envelope, ISequence sequence, bool throwIfUnhandled)
Parameters
Type |
Name |
Description |
TEnvelope |
envelope |
The envelope to be added to the sequence.
|
ISequence |
sequence |
The sequence to be added to the sequence.
|
System.Boolean |
throwIfUnhandled |
A boolean value indicating whether an exception must be thrown if no subscriber is handling the
message.
|
Returns
Type |
Description |
System.Threading.Tasks.Task<AddToSequenceResult> |
A System.Threading.Tasks.Task<TResult> representing the asynchronous operation. The task result contains
a flag indicating whether the operation was successful and the number of streams that have been
actually pushed.
|
|
Improve this doc
View source
CompleteAsync(CancellationToken)
Marks the sequence as complete, meaning no more messages will be pushed.
Declaration
protected virtual async Task CompleteAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
A System.Threading.CancellationToken used to cancel the operation.
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
A System.Threading.Tasks.Task representing the asynchronous operation.
|
|
Improve this doc
View source
CreateStream<TMessage>(IReadOnlyCollection<IMessageFilter>)
Declaration
public IMessageStreamEnumerable<TMessage> CreateStream<TMessage>(IReadOnlyCollection<IMessageFilter> filters = null)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IReadOnlyCollection<IMessageFilter> |
filters |
|
Returns
Type Parameters
Name |
Description |
TMessage |
|
|
Improve this doc
View source
Dispose()
Declaration
|
Improve this doc
View source
Dispose(Boolean)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged
resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
A value indicating whether the method has been called by the Dispose method and not from the
finalizer.
|
|
Improve this doc
View source
GetBrokerMessageIdentifiers()
Declaration
public IReadOnlyList<IBrokerMessageIdentifier> GetBrokerMessageIdentifiers()
Returns
|
Improve this doc
View source
IsLastMessage(TEnvelope)
Implements the logic to recognize the last message in the sequence without relying on the TotalCount
property.
Declaration
protected virtual bool IsLastMessage(TEnvelope envelope)
Parameters
Type |
Name |
Description |
TEnvelope |
envelope |
The envelope to be added to the sequence.
|
Returns
Type |
Description |
System.Boolean |
true if it is the last message, otherwise false .
|
|
Improve this doc
View source
OnTimeoutElapsedAsync()
Called when the timout is elapsed. If not overridden in a derived class, the default implementation
aborts the sequence.
Declaration
protected virtual Task OnTimeoutElapsedAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task |
A System.Threading.Tasks.Task representing the asynchronous operation.
|
Implements
System.IDisposable