Clerk.ForceLog Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Forces all log records to disk.
public:
void ForceLog();
public void ForceLog ();
member this.ForceLog : unit -> unit
Public Sub ForceLog ()
Examples
The following code example demonstrates the use of this method.
// Create a record of previous account status, and deliver it to the
// clerk.
int balance = ReadAccountBalance(Filename);
array<Object^>^ record = gcnew array<Object^>(2);
record[0] = Filename;
record[1] = balance;
clerk->WriteLogRecord(record);
clerk->ForceLog();
// Create a record of previous account status, and deliver it to the clerk.
int balance = AccountManager.ReadAccountBalance(filename);
Object[] record = new Object[2];
record[0] = filename;
record[1] = balance;
clerk.WriteLogRecord(record);
clerk.ForceLog();
' Create a record of previous account status, and deliver it to the clerk.
Dim balance As Integer = AccountManager.ReadAccountBalance(Filenam)
Dim record(1) As [Object]
record(0) = filename
record(1) = balance
clerk.WriteLogRecord(record)
clerk.ForceLog()
Remarks
The Compensating Resource Manager (CRM) Worker and CRM Compensator use this method to write records lazily to the log, which means they are not made durable until they have been forced to the log. Calling ForceLog makes all log records that have been written durable on disk.
Applies to
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา