LogRecordSequence.WriteRestartArea Method (ArraySegment<Byte>, SequenceNumber)
Writes a restart area to the LogRecordSequence and updates the base sequence number. This method cannot be inherited.
Assembly: System.IO.Log (in System.IO.Log.dll)
public SequenceNumber WriteRestartArea( ArraySegment<byte> data, SequenceNumber newBaseSeqNum )
- Type: System.ArraySegment<Byte>
A list of byte array segments that will be concatenated and appended as the record.
- 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 ValueType: System.IO.Log.SequenceNumber
The sequence number of the written restart area.
One or more of the arguments is invalid.
An I/O error occurred while writing the restart area.
The record sequence could not make enough free space to contain the new restart area.
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. The Common Log File System (CLFS) maintains two restart areas to guarantee that at least one valid area is always available. When a recovery is necessary, the CLFS reads its restart area and 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.
If a record sequence has been disposed of, or if you pass an invalid argument, exceptions are thrown immediately within this operation. Errors that occurred during an asynchronous append request, for example, a disk failure during the I/O request, will result in exceptions being thrown when the EndReserveAndAppend method is called.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.