FileRecordSequence.Flush Method

Definition

Causes appended records to be durably written.

Overloads

Flush()

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

Flush(SequenceNumber)

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

Flush()

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

C#
public System.IO.Log.SequenceNumber Flush();

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.

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

Remarks

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

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Flush(SequenceNumber)

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

C#
public System.IO.Log.SequenceNumber Flush(System.IO.Log.SequenceNumber 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 between the base and last sequence numbers of this sequence.

sequenceNumber is not valid for this sequence.

An I/O error occurred while flushing the data.

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

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

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

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1