LogRecordSequence.Flush Method (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.

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

public SequenceNumber Flush(
	SequenceNumber sequenceNumber
)

Parameters

sequenceNumber
Type: System.IO.Log.SequenceNumber

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

Return Value

Type: System.IO.Log.SequenceNumber

The sequence number of the last record written.

Exception Condition
ArgumentException

sequenceNumber is not valid for this sequence.

ArgumentOutOfRangeException

sequenceNumber 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.

InvalidOperationException

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

NotSupportedException

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

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.

SequenceFullException

The record sequence is full.

UnauthorizedAccessException

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

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

.NET Framework
Available since 3.0
Return to top
Show: