RecordAppendOptions RecordAppendOptions RecordAppendOptions RecordAppendOptions Enum

Definición

Especifica cómo se anexan los registros.Specifies how records are appended.

Esta enumeración tiene el atributo FlagsAttribute, que permite una combinación bit a bit de sus valores de miembro.

public enum class RecordAppendOptions
[System.Flags]
public enum RecordAppendOptions
type RecordAppendOptions = 
Public Enum RecordAppendOptions
Herencia
RecordAppendOptionsRecordAppendOptionsRecordAppendOptionsRecordAppendOptions
Atributos

Campos

ForceAppend ForceAppend ForceAppend ForceAppend 1

La secuencia del registro debería comenzar el proceso de vaciar los búferes internos una vez anexado este registro.The record sequence should begin the process of flushing internal buffers after this record is appended. Esto no indica que el registro deba escribirse de manera duradera antes de que la operación Anexo se haya completado.This does not indicate that the record should be durably written before the Append operation completes. Para obtener ese comportamiento, especifique el marcador ForceFlush.To get that behavior, specify the ForceFlush flag.

ForceFlush ForceFlush ForceFlush ForceFlush 2

La secuencia del registro debería vaciar cualquier búfer interno una vez anexado este registro.The record sequence should flush any internal buffers after this record is appended. Cuando la operación de anexado se completa, el registro especificado ya se ha escrito de manera duradera.When the Append operation completes, the specified record has been durably written.

None None None None 0

Los datos se escriben lentamente.Data is written lazily.

Ejemplos

El ejemplo siguiente muestra cómo utilizar esta enumeración con el método Append para anexar un registro a una secuencia del registro.The following example shows how to use this enumeration with the Append method to append a record to a log sequence.

// Append records. Appending three records.  
public void AppendRecords()
{
    Console.WriteLine("Appending Log Records...");
    SequenceNumber previous = SequenceNumber.Invalid;

    previous = sequence.Append(CreateData("Hello World!"), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush);
    previous = sequence.Append(CreateData("This is my first Logging App"), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush);
    previous = sequence.Append(CreateData("Using LogRecordSequence..."), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush);

    Console.WriteLine("Done...");
}
' Append records. Appending three records.  
Public Sub AppendRecords()
	Console.WriteLine("Appending Log Records...")
	Dim previous As SequenceNumber = SequenceNumber.Invalid

	previous = sequence.Append(CreateData("Hello World!"), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush)
	previous = sequence.Append(CreateData("This is my first Logging App"), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush)
	previous = sequence.Append(CreateData("Using LogRecordSequence..."), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush)

	Console.WriteLine("Done...")
End Sub

Se aplica a