Edit

Share via


LogStateWithMetaData<TEntry> Class

Definition

A class that extends grain state with versioning metadata, so that a log-consistent grain can use a standard storage provider.

[System.Serializable]
public class LogStateWithMetaData<TEntry> where TEntry : class
[System.Serializable]
[Orleans.GenerateSerializer]
public sealed class LogStateWithMetaData<TEntry> where TEntry : class
[<System.Serializable>]
type LogStateWithMetaData<'Entry (requires 'Entry : null)> = class
[<System.Serializable>]
[<Orleans.GenerateSerializer>]
type LogStateWithMetaData<'Entry (requires 'Entry : null)> = class
Public Class LogStateWithMetaData(Of TEntry)
Public NotInheritable Class LogStateWithMetaData(Of TEntry)

Type Parameters

TEntry
Inheritance
LogStateWithMetaData<TEntry>
Attributes

Constructors

LogStateWithMetaData<TEntry>()

Initializes a new instance of the LogStateWithMetaData<TEntry> class.

Properties

GlobalVersion

The length of the log

Log

The stored view of the log

WriteVector

Metadata that is used to avoid duplicate appends. Logically, this is a (string->bit) map, the keys being replica ids But this map is represented compactly as a simple string to reduce serialization/deserialization overhead Bits are read by GetBit(String) and flipped by FlipBit(String). Bits are toggled when writing, so that the retry logic can avoid appending an entry twice when retrying a failed append.

Methods

FlipBit(String)

Toggle one of the bits in WriteVector and return the new value.

GetBit(String)

Gets one of the bits in WriteVector

Applies to