Class FlatFileMessageStorage
File message storage implementation.
Inheritance
System.Object
FlatFileMessageStorage
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()
Namespace: FixAntenna.FixEngine.Storage.File
Assembly: FixAntenna.Core.dll
Syntax
public class FlatFileMessageStorage : AbstractFileMessageStorage, IMessageStorage, IDisposable
Constructors
FlatFileMessageStorage(Config)
Creates FlatFileMessageStorage
.
Declaration
public FlatFileMessageStorage(Config config)
Parameters
Type | Name | Description |
---|---|---|
Config | config |
Fields
ChannelLength
Declaration
protected long ChannelLength
Field Value
Type | Description |
---|---|
System.Int64 |
ChannelPosition
Declaration
protected long ChannelPosition
Field Value
Type | Description |
---|---|
System.Int64 |
DateFormattedBuffer
Declaration
protected byte[] DateFormattedBuffer
Field Value
Type | Description |
---|---|
System.Byte[] |
Delta
Declaration
protected const long Delta = 1000L
Field Value
Type | Description |
---|---|
System.Int64 |
IsTimestampEnabled
Declaration
protected bool IsTimestampEnabled
Field Value
Type | Description |
---|---|
System.Boolean |
MaskedTags
Declaration
protected IMaskedTags MaskedTags
Field Value
Type | Description |
---|---|
IMaskedTags |
MaxStorageGrowSize
Declaration
protected long MaxStorageGrowSize
Field Value
Type | Description |
---|---|
System.Int64 |
NewLine
Declaration
protected static readonly byte[] NewLine
Field Value
Type | Description |
---|---|
System.Byte[] |
RawTags
Declaration
protected RawFixUtil.IRawTags RawTags
Field Value
Type | Description |
---|---|
RawFixUtil.IRawTags |
StorageGrowSize
Declaration
protected bool StorageGrowSize
Field Value
Type | Description |
---|---|
System.Boolean |
TimestampTicks
Declaration
protected long TimestampTicks
Field Value
Type | Description |
---|---|
System.Int64 |
WriteBufferLengthDef
Declaration
protected const int WriteBufferLengthDef = 8192
Field Value
Type | Description |
---|---|
System.Int32 |
Methods
AppendMessage(Byte[], Byte[])
Appends message to storage with the given formatted timestampFormatted.
Declaration
public override void AppendMessage(byte[] timestampFormatted, byte[] message)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | timestampFormatted | the message timestampFormatted |
System.Byte[] | message | the message |
Overrides
Exceptions
Type | Condition |
---|---|
System.IO.IOException | if error occurred. |
AppendMessage(Byte[], Byte[], Int32, Int32)
Appends message to storage with the given formatted timestamp.
Declaration
public override void AppendMessage(byte[] timestampFormatted, byte[] message, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | timestampFormatted | the message timestamp |
System.Byte[] | message | the message |
System.Int32 | offset | the initial offset |
System.Int32 | length | the length |
Overrides
Exceptions
Type | Condition |
---|---|
System.IO.IOException | if error occurred. |
AppendMessageInternal(Byte[], Byte[], Int32, Int32)
Declaration
protected virtual long AppendMessageInternal(byte[] timestampFormatted, byte[] message, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | timestampFormatted | |
System.Byte[] | message | |
System.Int32 | offset | |
System.Int32 | length |
Returns
Type | Description |
---|---|
System.Int64 |
AppendMessageInternal(Int64, Byte[], Int32, Int32)
Appends message to storage
Declaration
protected override long AppendMessageInternal(long ticks, byte[] message, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | ticks | the timestamp parameter, in .Net Tick units. |
System.Byte[] | message | the array of bytes |
System.Int32 | offset | |
System.Int32 | length |
Returns
Type | Description |
---|---|
System.Int64 |
Overrides
Exceptions
Type | Condition |
---|---|
System.IO.IOException | if I/O error occurred |
Close()
Declaration
public override void Close()
Overrides
GetNextSequenceNumber()
Gets next sequence number.
Declaration
public override long GetNextSequenceNumber()
Returns
Type | Description |
---|---|
System.Int64 |
Overrides
Exceptions
Type | Condition |
---|---|
System.IO.IOException | if I/O error occurred |
OpenStorageFile()
Declaration
public override void OpenStorageFile()
Overrides
RetrieveMessagesImplementation(Int64, Int64, IMessageStorageListener, Boolean)
The method RetrieveMessages
is not supported in this instance.
Declaration
protected override void RetrieveMessagesImplementation(long from, long to, IMessageStorageListener listener, bool blocking)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | from | |
System.Int64 | to | |
IMessageStorageListener | listener | |
System.Boolean | blocking |
Overrides
Exceptions
Type | Condition |
---|---|
System.IO.IOException | Message retrieval is not possible for flat files |
See Also
RetrieveSequenceNumber(String)
Retrieves the last sequence number.
Declaration
public static long RetrieveSequenceNumber(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | the file name |
Returns
Type | Description |
---|---|
System.Int64 |
Exceptions
Type | Condition |
---|---|
System.IO.IOException | if I/O error occurred |
Implements
System.IDisposable