Export (0) Print
Expand All

LogRecordSequence.WriteRestartArea Method (Generic IList, SequenceNumber, ReservationCollection)

Writes a restart area to the LogRecordSequence using a reservation, and updates the base sequence number. This method cannot be inherited.

Namespace: System.IO.Log
Assembly: System.IO.Log (in system.io.log.dll)

public SequenceNumber WriteRestartArea (
	IList<ArraySegment<byte>> data,
	SequenceNumber newBaseSeqNum,
	ReservationCollection reservationCollection
)
public final SequenceNumber WriteRestartArea (
	IList<ArraySegment<byte>> data, 
	SequenceNumber newBaseSeqNum, 
	ReservationCollection reservationCollection
)
public final function WriteRestartArea (
	data : IList<ArraySegment<byte>>, 
	newBaseSeqNum : SequenceNumber, 
	reservationCollection : ReservationCollection
) : SequenceNumber
Not applicable.

Parameters

data

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

newBaseSeqNum

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

reservationCollection

A ReservationCollection that contains the reservation that should be used for this restart area.

Return Value

The sequence number of the written restart area.

Exception typeCondition

ArgumentException

newBaseSeqNum is not valid for this sequence.

-or-

The specified log enumeration start sequence number is invalid.

-or-

data cannot be appended because it is larger than the maximum record size.

-or-

reservationCollection was not created by this record sequence.

ArgumentNullException

One or more of the parameters is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

A new or existing archive tail or base of the active log is invalid.

-or-

newBaseSeqNum is not between the base and last sequence numbers of this sequence.

IOException

The request could not be performed because of an unexpected I/O exception.

-or-

The request could not be performed because of an I/O device error.

ObjectDisposedException

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

OutOfMemoryException

There is not enough memory to continue the execution of the program.

UnauthorizedAccessException

Access for the specified log sequence is denied by the operating system.

SequenceFullException

The record sequence is full.

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.

If a reservation is specified, the written restart area will consume space that has been previously reserved, using a reservation contained in the collection. If the method succeeds, it will consume the smallest reservation that can contain the data, and that reservation will be removed from the collection.

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.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft