IRecordSequence Interface

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 : IDisposable

NameDescription
System_CAPS_pubpropertyBaseSequenceNumber

When overridden in a derived class, gets the sequence number of the first valid record in the current IRecordSequence.

System_CAPS_pubpropertyLastSequenceNumber

When overridden in a derived class, gets the sequence number which is greater than the last record appended.

System_CAPS_pubpropertyMaximumRecordLength

When overridden in a derived class, gets the size of the largest record that can be appended to or read from this sequence, in bytes.

System_CAPS_pubpropertyReservedBytes

When overridden in a derived class, gets the total number of bytes that have been reserved.

System_CAPS_pubpropertyRestartSequenceNumber

When overridden in a derived class, gets the sequence number of the most recently written restart area.

System_CAPS_pubpropertyRetryAppend

Gets or sets a value indicating whether appends are automatically retried if the log is full.

NameDescription
System_CAPS_pubmethodAdvanceBaseSequenceNumber(SequenceNumber)

Moves the base sequence number of the log forward.

System_CAPS_pubmethodAppend(ArraySegment<Byte>, SequenceNumber, SequenceNumber, RecordAppendOptions)

When overridden in a derived class, writes a log record to the IRecordSequence.

System_CAPS_pubmethodAppend(ArraySegment<Byte>, SequenceNumber, SequenceNumber, RecordAppendOptions, ReservationCollection)

When overridden in a derived class, appends a log record to the IRecordSequence, using space previously reserved in the sequence.

System_CAPS_pubmethodAppend(IList<ArraySegment<Byte>>, SequenceNumber, SequenceNumber, RecordAppendOptions)

When overridden in a derived class, appends a log record to the IRecordSequence.

System_CAPS_pubmethodAppend(IList<ArraySegment<Byte>>, SequenceNumber, SequenceNumber, RecordAppendOptions, ReservationCollection)

When overridden in a derived class, appends a log record to the IRecordSequence, using space previously reserved in the sequence.

System_CAPS_pubmethodBeginAppend(ArraySegment<Byte>, SequenceNumber, SequenceNumber, RecordAppendOptions, AsyncCallback, Object)

When overridden in a derived class, begins an asynchronous append operation.

System_CAPS_pubmethodBeginAppend(ArraySegment<Byte>, SequenceNumber, SequenceNumber, RecordAppendOptions, ReservationCollection, AsyncCallback, Object)

When overridden in a derived class, begins an asynchronous append operation using space previously reserved in the sequence.

System_CAPS_pubmethodBeginAppend(IList<ArraySegment<Byte>>, SequenceNumber, SequenceNumber, RecordAppendOptions, AsyncCallback, Object)

When overridden in a derived class, begins an asynchronous append operation, using space previously reserved in the sequence.

System_CAPS_pubmethodBeginAppend(IList<ArraySegment<Byte>>, SequenceNumber, SequenceNumber, RecordAppendOptions, ReservationCollection, AsyncCallback, Object)

When overridden in a derived class, begins an asynchronous append operation, using space previously reserved in the sequence.

System_CAPS_pubmethodBeginFlush(SequenceNumber, AsyncCallback, Object)

When overridden in a derived class, begins an asynchronous flush operation, using space previously reserved in the sequence.

System_CAPS_pubmethodBeginReserveAndAppend(ArraySegment<Byte>, SequenceNumber, SequenceNumber, RecordAppendOptions, ReservationCollection, Int64[], AsyncCallback, Object)

When overridden in a derived class, begins an asynchronous reserve and append operation.

System_CAPS_pubmethodBeginReserveAndAppend(IList<ArraySegment<Byte>>, SequenceNumber, SequenceNumber, RecordAppendOptions, ReservationCollection, Int64[], AsyncCallback, Object)

When overridden in a derived class, begins an asynchronous reserve and append operation.

System_CAPS_pubmethodBeginWriteRestartArea(ArraySegment<Byte>, SequenceNumber, ReservationCollection, AsyncCallback, Object)

When overridden in a derived class, begins an asynchronous restart area write operation, using space previously reserved in the sequence.

System_CAPS_pubmethodBeginWriteRestartArea(IList<ArraySegment<Byte>>, SequenceNumber, ReservationCollection, AsyncCallback, Object)

When overridden in a derived class, begins an asynchronous restart area write operation, using space previously reserved in the sequence.

System_CAPS_pubmethodCreateReservationCollection()

When overridden in a derived class, creates a new ReservationCollection.

System_CAPS_pubmethodDispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.(Inherited from IDisposable.)

System_CAPS_pubmethodEndAppend(IAsyncResult)

When overridden in a derived class, ends an asynchronous append operation.

System_CAPS_pubmethodEndFlush(IAsyncResult)

When overridden in a derived class, ends an asynchronous flush operation.

System_CAPS_pubmethodEndReserveAndAppend(IAsyncResult)

When overridden in a derived class, ends an asynchronous reserve and append operation.

System_CAPS_pubmethodEndWriteRestartArea(IAsyncResult)

When overridden in a derived class, ends an asynchronous restart area write operation.

System_CAPS_pubmethodFlush()

When overridden in a derived class, ensures that all appended records have been written.

System_CAPS_pubmethodFlush(SequenceNumber)

When overridden in a derived class, ensures that all appended records up to and including the record with the specified sequence number have been durably written.

System_CAPS_pubmethodReadLogRecords(SequenceNumber, LogRecordEnumeratorType)

When overridden in a derived class, returns an enumerable collection of records in the sequence.

System_CAPS_pubmethodReadRestartAreas()

When overridden in a derived class, returns an enumerable collection of the restart areas in the sequence.

System_CAPS_pubmethodReserveAndAppend(ArraySegment<Byte>, SequenceNumber, SequenceNumber, RecordAppendOptions, ReservationCollection, Int64[])

When overridden in a derived class, automatically makes a single reservation and appends a record to the sequence.

System_CAPS_pubmethodReserveAndAppend(IList<ArraySegment<Byte>>, SequenceNumber, SequenceNumber, RecordAppendOptions, ReservationCollection, Int64[])

When overridden in a derived class, automatically makes a single reservation and appends a record to the sequence.

System_CAPS_pubmethodWriteRestartArea(ArraySegment<Byte>)

When overridden in a derived class, writes a restart area to the IRecordSequence.

System_CAPS_pubmethodWriteRestartArea(ArraySegment<Byte>, SequenceNumber)

When overridden in a derived class, writes a restart area to the IRecordSequence and updates the base sequence number

System_CAPS_pubmethodWriteRestartArea(ArraySegment<Byte>, SequenceNumber, ReservationCollection)

When overridden in a derived class, writes a restart area to the IRecordSequence using a reservation, and updates the base sequence number

System_CAPS_pubmethodWriteRestartArea(IList<ArraySegment<Byte>>)

When overridden in a derived class, writes a restart area to the IRecordSequence.

System_CAPS_pubmethodWriteRestartArea(IList<ArraySegment<Byte>>, SequenceNumber)

When overridden in a derived class, writes a restart area to the IRecordSequence and updates the base sequence number.

System_CAPS_pubmethodWriteRestartArea(IList<ArraySegment<Byte>>, SequenceNumber, ReservationCollection)

When overridden in a derived class, writes a restart area to the IRecordSequence using a reservation, and updates the base sequence number.

NameDescription
System_CAPS_pubeventTailPinned

Occurs when the record sequence determines that the tail must be moved forward.

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 M:System.IO.Log.IRecordSequence.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.

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft