GrainStateWithMetaData<TView> 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.
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 GrainStateWithMetaData<TView> where TView : class, new()
[System.Serializable]
[Orleans.GenerateSerializer]
public sealed class GrainStateWithMetaData<TView> where TView : class, new()
[<System.Serializable>]
type GrainStateWithMetaData<'View (requires 'View : null and 'View : (new : unit -> 'View))> = class
[<System.Serializable>]
[<Orleans.GenerateSerializer>]
type GrainStateWithMetaData<'View (requires 'View : null and 'View : (new : unit -> 'View))> = class
Public Class GrainStateWithMetaData(Of TView)
Public NotInheritable Class GrainStateWithMetaData(Of TView)
Type Parameters
- TView
- Inheritance
-
GrainStateWithMetaData<TView>
- Attributes
Constructors
GrainStateWithMetaData<TView>() |
Initializes a new instance of the GrainStateWithMetaData<TView> class. |
GrainStateWithMetaData<TView>(TView) |
Initializes a new instance of the GrainStateWithMetaData<TView> class. |
Properties
GlobalVersion |
The length of the log |
State |
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 |