TailPinnedEventArgs Class
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.
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
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) |
Initializes a new instance of the TailPinnedEventArgs class. |
Properties
TargetSequenceNumber |
Gets the sequence number that the tail should be moved past. |
Methods
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |