TailPinnedEventArgs TailPinnedEventArgs TailPinnedEventArgs TailPinnedEventArgs Class

Definition

Provides data for the TailPinned event. 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
Inheritance
TailPinnedEventArgsTailPinnedEventArgsTailPinnedEventArgsTailPinnedEventArgs

Examples

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);  
  
}  

Remarks

The TailPinned event can be fired when the record sequence has run out of space. When this event is fired, the tail of the sequence (that is, the base sequence number) is moved forward to free up space.

Constructors

TailPinnedEventArgs(SequenceNumber) TailPinnedEventArgs(SequenceNumber) TailPinnedEventArgs(SequenceNumber) TailPinnedEventArgs(SequenceNumber)

Initializes a new instance of the TailPinnedEventArgs class.

Properties

TargetSequenceNumber TargetSequenceNumber TargetSequenceNumber TargetSequenceNumber

Gets the sequence number that the tail should be moved past.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to