Class SyncMessagePumper
The message pumper writes messages to transport.
Inheritance
System.Object
SyncMessagePumper
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: FixAntenna.Core.dll
Syntax
public sealed class SyncMessagePumper : AffinitySupportThread, IDisposable, IMessagePumper, IWorkerThread
Constructors
SyncMessagePumper(IExtendedFixSession, IQueue<FixMessageWithType>, IMessageStorage, IFixMessageFactory, IFixTransport, IEncryption, ISessionSequenceManager)
Creates the SyncMessagePumper.
Declaration
public SyncMessagePumper(IExtendedFixSession extendedFixSession, IQueue<FixMessageWithType> queue, IMessageStorage out, IFixMessageFactory messageFactory, IFixTransport transport, IEncryption encryption, ISessionSequenceManager sequenceManager)
Parameters
Fields
TraceEnabled
Declaration
public static readonly bool TraceEnabled
Field Value
| Type |
Description |
| System.Boolean |
|
Methods
FillBuffer(FixMessageWithType, MsgBuf)
Declaration
public bool FillBuffer(FixMessageWithType messageWithType, MsgBuf buf)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
FillBuffer(Int32)
Declaration
public int FillBuffer(int queueSize)
Parameters
| Type |
Name |
Description |
| System.Int32 |
queueSize |
|
Returns
| Type |
Description |
| System.Int32 |
|
GetMessageProcessedTimestamp()
Declaration
public long GetMessageProcessedTimestamp()
Returns
| Type |
Description |
| System.Int64 |
|
GetMessageStatistic()
Gets statistic of processed messages.
WARNING: Before the call to ensure that the statistics are included.
Declaration
public MessageStatistic GetMessageStatistic()
Returns
Exceptions
| Type |
Condition |
| System.InvalidOperationException |
if statisticEnabled is false
|
See Also
GetOutgoingMessageStorage()
Gets outgoing message storage.
Declaration
public IMessageStorage GetOutgoingMessageStorage()
Returns
HasAnyWorkQueued()
Declaration
public bool HasAnyWorkQueued()
Returns
| Type |
Description |
| System.Boolean |
|
HasDataChunkToTransfer()
Declaration
public bool HasDataChunkToTransfer()
Returns
| Type |
Description |
| System.Boolean |
|
HasWorkQueued()
Declaration
public bool HasWorkQueued()
Returns
| Type |
Description |
| System.Boolean |
|
Init()
Declaration
Returns
| Type |
Description |
| System.Int64 |
|
IsStatisticEnabled()
Declaration
public bool IsStatisticEnabled()
Returns
| Type |
Description |
| System.Boolean |
true is statistic is enabled
|
RejectFirstQueueMessage()
Declaration
public void RejectFirstQueueMessage()
RejectQueueMessages()
Reject all non send message.
Declaration
public void RejectQueueMessages()
Run()
Declaration
protected override void Run()
Overrides
ScheduleChunkToTransfer(Int32, Int32)
Declaration
public void ScheduleChunkToTransfer(int start, int end)
Parameters
| Type |
Name |
Description |
| System.Int32 |
start |
|
| System.Int32 |
end |
|
Send(FixMessage, Nullable<ChangesType>)
Pool the message to queue.
Declaration
public int Send(FixMessage content, ChangesType? allowedChangesType)
Parameters
| Type |
Name |
Description |
| FixMessage |
content |
the message content
|
| System.Nullable<ChangesType> |
allowedChangesType |
the change type
|
Returns
| Type |
Description |
| System.Int32 |
|
Send(FixMessage, Nullable<ChangesType>, FixSessionSendingType)
Declaration
public int Send(FixMessage content, ChangesType? allowedChangesType, FixSessionSendingType optionMask)
Parameters
Returns
| Type |
Description |
| System.Int32 |
|
Send(String, FixMessage)
Declaration
public int Send(string msgType, FixMessage content)
Parameters
| Type |
Name |
Description |
| System.String |
msgType |
|
| FixMessage |
content |
|
Returns
| Type |
Description |
| System.Int32 |
|
Send(String, FixMessage, FixSessionSendingType)
Pool the message to queue.
Declaration
public int Send(string msgType, FixMessage content, FixSessionSendingType optionMask)
Parameters
Returns
| Type |
Description |
| System.Int32 |
|
SendMessages(Int32)
Declaration
public void SendMessages(int messageCount)
Parameters
| Type |
Name |
Description |
| System.Int32 |
messageCount |
|
SendMessages(Int32, Byte[])
Declaration
public bool SendMessages(int messageCount, byte[] externalBuffer)
Parameters
| Type |
Name |
Description |
| System.Int32 |
messageCount |
|
| System.Byte[] |
externalBuffer |
|
Returns
| Type |
Description |
| System.Boolean |
|
SendOutOfTurn(String, FixMessage)
Declaration
public bool SendOutOfTurn(string msgType, FixMessage content)
Parameters
| Type |
Name |
Description |
| System.String |
msgType |
|
| FixMessage |
content |
|
Returns
| Type |
Description |
| System.Boolean |
|
SetGracefulShutdown(Boolean)
Sets gracefulShutdown flag.
Declaration
public void SetGracefulShutdown(bool gracefulShutdown)
Parameters
| Type |
Name |
Description |
| System.Boolean |
gracefulShutdown |
the graceful shutdown flag
|
SetMessageProcessedTimestamp(Int64)
Declaration
public void SetMessageProcessedTimestamp(long timestamp)
Parameters
| Type |
Name |
Description |
| System.Int64 |
timestamp |
|
Shutdown()
Shutdown the pumper.
This method calls engine before the session is close.
This is blocked method.
If queue has the messages and if message rejecting is
Declaration
public override void Shutdown()
Overrides
See Also
Implements
System.IDisposable
See Also