Class SlicedIndexedMessageStorage
Inheritance
System.Object
SlicedIndexedMessageStorage
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 SlicedIndexedMessageStorage : SlicedFileMessageStorage, IMessageStorage, IDisposable
Constructors
SlicedIndexedMessageStorage(Config)
Declaration
public SlicedIndexedMessageStorage(Config config)
Parameters
Type | Name | Description |
---|---|---|
Config | config |
Fields
DefaultExt
Declaration
public const string DefaultExt = ".idx"
Field Value
Type | Description |
---|---|
System.String |
Methods
AppendMessageInternal(Int64, Byte[], Int32, Int32)
Appends message to storage
Declaration
protected override long AppendMessageInternal(long timestamp, byte[] message, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | timestamp | |
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 |
AppendMessageToFile(Int64, Byte[], Int32, Int32)
Declaration
public virtual long AppendMessageToFile(long timestamp, byte[] message, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | timestamp | |
System.Byte[] | message | |
System.Int32 | offset | |
System.Int32 | length |
Returns
Type | Description |
---|---|
System.Int64 |
BackupStorageFile(String, String)
Declaration
public override void BackupStorageFile(string fullPathToStorageFile, string fullPathToDestinationBackupFile)
Parameters
Type | Name | Description |
---|---|---|
System.String | fullPathToStorageFile | |
System.String | fullPathToDestinationBackupFile |
Overrides
CalculateFormatLength()
This method is used to calculate FormatLength. Override it to change how FormatLength is calculated.
Declaration
protected override int CalculateFormatLength()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
Close()
Close the storage.
Declaration
public override void Close()
Overrides
Exceptions
Type | Condition |
---|---|
System.IO.IOException | if I/O error occurred |
DeleteStorageFile(String)
Declaration
public override void DeleteStorageFile(string fullPathToStorageFile)
Parameters
Type | Name | Description |
---|---|---|
System.String | fullPathToStorageFile |
Overrides
GetIndexFileName()
Declaration
public virtual string GetIndexFileName()
Returns
Type | Description |
---|---|
System.String |
GetNextSequenceNumber()
Declaration
public override long GetNextSequenceNumber()
Returns
Type | Description |
---|---|
System.Int64 |
Overrides
See Also
NextChunk()
Declaration
public override void NextChunk()
Overrides
OpenStorageFile()
Opens the indexed file.
Declaration
public override void OpenStorageFile()
Overrides
Exceptions
Type | Condition |
---|---|
System.IO.IOException | if I/O errors occurred |
ReadFromStorage(FileStream, Int64, Int32)
Declaration
public virtual byte[] ReadFromStorage(FileStream readChannel, long readFrom, int messageLength)
Parameters
Type | Name | Description |
---|---|---|
System.IO.FileStream | readChannel | |
System.Int64 | readFrom | |
System.Int32 | messageLength |
Returns
Type | Description |
---|---|
System.Byte[] |
RetrieveMessagesImplementation(Int64, Int64, IMessageStorageListener, Boolean)
Retrieves message from storage.
Declaration
protected override void RetrieveMessagesImplementation(long from, long to, IMessageStorageListener listener, bool blocking)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | from | the start sequence position |
System.Int64 | to | the end sequence position |
IMessageStorageListener | listener | the callback listener |
System.Boolean | blocking | if sets to true the method call not blocking |
Overrides
Exceptions
Type | Condition |
---|---|
System.IO.IOException | |
System.InvalidOperationException | |
StorageClosedException |
Implements
System.IDisposable