Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IRecordSequence.WriteRestartArea Method (ArraySegment<Byte>, SequenceNumber)

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

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

SequenceNumber WriteRestartArea(
	ArraySegment<byte> data,
	SequenceNumber newBaseSequenceNumber
)

Parameters

data
Type: System.ArraySegment<Byte>

A list of byte array segments that will be concatenated and appended as the record.

newBaseSequenceNumber
Type: System.IO.Log.SequenceNumber

The new base sequence number. The specified sequence number must be greater than or equal to the current base sequence number.

Return Value

Type: System.IO.Log.SequenceNumber
The sequence number of the written restart area.

ExceptionCondition
ArgumentException

One or more of the arguments is invalid.

IOException

An I/O error occurred while writing the restart area.

SequenceFullException

The record sequence could not make enough free space to contain the new restart area.

ObjectDisposedException

The method was called after the sequence has been disposed of.

A restart area is used to temporarily store information containing a client's last checkpoint operation. When a recovery is necessary, you can parse the restart area to retrieve all the data from the last checkpoint operation. This data initializes the transaction table, dirty pages table, and open file table so they can be used in the recovery process. A restart area can be read using the ReadRestartAreas method.

When a restart area is written, the data in the byte array segments are concatenated into a single byte array for appending as the record. No provision is made for splitting data back into array segments when the restart area is read.

When this method successfully completes, the base sequence number has been updated. All log records with sequence numbers less than the new base sequence number are inaccessible.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft