Редагувати

Поділитися через


LogRecordSequence.Flush Method

Definition

Writes appended records durably.

Overloads

Flush()

Ensures that all appended records have been written. This method cannot be inherited.

Flush(SequenceNumber)

Ensures that all appended records up to and including the record with the specified sequence number have been durably written. This method cannot be inherited.

Flush()

Ensures that all appended records have been written. This method cannot be inherited.

public:
 virtual System::IO::Log::SequenceNumber Flush();
public System.IO.Log.SequenceNumber Flush ();
abstract member Flush : unit -> System.IO.Log.SequenceNumber
override this.Flush : unit -> System.IO.Log.SequenceNumber
Public Function Flush () As SequenceNumber

Returns

The sequence number of the last record written.

Implements

Exceptions

An I/O error occurred while flushing the data.

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

This operation is not supported.

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

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

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

The specified log does not have any extents. One or more extents must be created before a record sequence can be used.

Remarks

Calling this method ensures that all records that have been appended to the LogRecordSequence have been durably written.

Applies to

Flush(SequenceNumber)

Ensures that all appended records up to and including the record with the specified sequence number have been durably written. This method cannot be inherited.

public:
 virtual System::IO::Log::SequenceNumber Flush(System::IO::Log::SequenceNumber sequenceNumber);
public System.IO.Log.SequenceNumber Flush (System.IO.Log.SequenceNumber sequenceNumber);
abstract member Flush : System.IO.Log.SequenceNumber -> System.IO.Log.SequenceNumber
override this.Flush : System.IO.Log.SequenceNumber -> System.IO.Log.SequenceNumber
Public Function Flush (sequenceNumber As SequenceNumber) As SequenceNumber

Parameters

sequenceNumber
SequenceNumber

The sequence number of the latest record that must be written. If this SequenceNumber is invalid, then all records must be written.

Returns

The sequence number of the last record written.

Implements

Exceptions

sequenceNumber is not valid for this sequence.

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

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

The specified log does not have any extents. One or more extents must be created before a record sequence can be used.

The operation cannot be performed because the record sequence was opened with read-only access.

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

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

The record sequence is full.

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

Remarks

Calling this method ensures that all records with sequence numbers up to and including the specified sequence number have been durably written.

Applies to