TailPinnedEventArgs Classe

Definição

Fornece dados para o evento de TailPinned .Provides data for the TailPinned event. Essa classe não pode ser herdada.This class cannot be inherited.

public ref class TailPinnedEventArgs sealed : EventArgs
public sealed class TailPinnedEventArgs : EventArgs
type TailPinnedEventArgs = class
    inherit EventArgs
Public NotInheritable Class TailPinnedEventArgs
Inherits EventArgs
Herança
TailPinnedEventArgs

Exemplos

Este exemplo mostra como usar o TailPinned evento para liberar espaço em uma sequência de log.This example shows how to use the TailPinned event to free up space in a log sequence.

recordSequence.RetryAppend = true;  
recordSequence.TailPinned += new EventHandler<TailPinnedEventArgs>(HandleTailPinned);  

void HandleTailPinned(object sender, TailPinnedEventArgs tailPinnedEventArgs)  
{  
   // tailPinnedEventArgs.TargetSequenceNumber is the target   
   // sequence number to free up space to.    
   // However, this sequence number is not necessarily valid.  We have  
   // to use this sequence number as a starting point for finding a  
   // valid point within the log to advance toward. You need to  
   // identify a record with a sequence number equal to, or greater  
   // than TargetSequenceNumber; let's call this   
   // realTargetSequenceNumber. Once found, move the base  

   recordSequence.AdvanceBaseSequenceNumber(realTargetSequenceNumber);  

}  

Comentários

O TailPinned evento pode ser acionado quando a sequência de registro ficar sem espaço.The TailPinned event can be fired when the record sequence has run out of space. Quando esse evento é disparado, a parte final da sequência (ou seja, o número de sequência base) é movida para o espaço livre.When this event is fired, the tail of the sequence (that is, the base sequence number) is moved forward to free up space.

Construtores

TailPinnedEventArgs(SequenceNumber)

Inicializa uma nova instância da classe TailPinnedEventArgs.Initializes a new instance of the TailPinnedEventArgs class.

Propriedades

TargetSequenceNumber

Obtém o número de sequência que o final deve ser passado para frente.Gets the sequence number that the tail should be moved past.

Métodos

Equals(Object)

Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object.

(Herdado de Object)
GetHashCode()

Serve como a função de hash padrão.Serves as the default hash function.

(Herdado de Object)
GetType()

Obtém o Type da instância atual.Gets the Type of the current instance.

(Herdado de Object)
MemberwiseClone()

Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object.

(Herdado de Object)
ToString()

Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object.

(Herdado de Object)

Aplica-se a