Begins an asynchronous flush operation, using space previously reserved in the sequence. This method cannot be inherited.
Assembly: System.IO.Log (in System.IO.Log.dll)
public IAsyncResult BeginFlush( SequenceNumber sequenceNumber, AsyncCallback callback, Object state )
- 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.
- Type: System.AsyncCallback
An optional asynchronous callback, to be called when the flush is complete.
- Type: System.Object
A user-provided object that distinguishes this particular asynchronous flush request from other requests.
Return ValueType: System.IAsyncResult
An IAsyncResult that represents the asynchronous flush operation, which could still be pending.
ImplementsIRecordSequence.BeginFlush(SequenceNumber, AsyncCallback, Object)
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.
You should pass the IAsyncResult returned by the current method to the EndFlush method to ensure that the flush completes and resources are freed appropriately. If an error occurs during an asynchronous flush, an exception is not thrown until the EndFlush method is called with the IAsyncResult returned by this method.
Calling this method ensures that all records that have been appended to the LogRecordSequence are durably written.
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 flush request, for example, a disk failure during the I/O request, will result in exceptions being thrown when the EndFlush 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.