Export (0) Print
Expand All

IRecordSequence Interface

Provides a generic interface to a sequence of records.

Namespace:  System.IO.Log
Assembly:  System.IO.Log (in System.IO.Log.dll)

public interface IRecordSequence extends IDisposable

The IRecordSequence interface provides an abstract interface to a record-oriented stream. A IRecordSequence instance can be used to read and write log records.

The IRecordSequence interface provides the following capabilities,

  • Append log records using the Append methods.

  • Read the appended records using the ReadLogRecords method.

  • Write a special restart record using the WriteRestartArea method.

  • Read restart records from the most recently written restart record using the ReadRestartAreas method.

  • Flush the records to durable store using the Flush method.

  • Reserve space for appending records.

  • Free log space by advancing the base of the log.

  • Receive TailPinned event notifications to move the base of the log to free space.

Log records are appended to a IRecordSequence instance, and each log record is given a unique sequence number. Sequence numbers are strictly monotonically increasing within a given record sequence. A log record consists of opaque data, supplied to the IRecordSequence instance in an IList of ArraySegments of bytes.

The IRecordSequence interface also exposes a few basic properties which provides information about log boundaries.

  • The BaseSequenceNumber property contains the sequence number of the first valid record in the record sequence.

  • The LastSequenceNumber property contains a sequence number that is guaranteed to be larger than the sequence number of the last appended record.

  • The RestartSequenceNumber property contains the sequence number of the last written restart area.

  • The MaximumRecordLength property contains the size of the largest record that can be appended to, or read from the sequence.

  • The ReservedBytes property contains the total size of all reservations made in this record sequence.

  • If the RetryAppend property is set to true, and an Append operation fails because there is no space in the sequence, the record sequence will attempt to free space, and retry the Append operation.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2014 Microsoft