LaunchDarkly Dotnet Server SDK
Search Results for

    Show / Hide Table of Contents

    Struct DataStoreTypes.ItemDescriptor

    A versioned item (or placeholder) storeable in an IDataStore.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: LaunchDarkly.Sdk.Server.Subsystems
    Assembly: LaunchDarkly.ServerSdk.dll
    Syntax
    public struct DataStoreTypes.ItemDescriptor
    Remarks

    This is used for data stores that directly store objects as-is, as the default in-memory store does. Items are typed as object; the store should not know or care what the actual object is.

    For any given key within a DataStoreTypes.DataKind, there can be either an existing item with a version, or a "tombstone" placeholder representing a deleted item (also with a version. Deleted item placeholders are used so that if an item is first updated with version N and then deleted with version N+1, but the SDK receives those changes out of order, version N will not overwrite the deletion.

    Persistent data stores use DataStoreTypes.SerializedItemDescriptor instead.

    Constructors

    | Edit this page View Source

    ItemDescriptor(int, object)

    Constructs an instance.

    Declaration
    public ItemDescriptor(int version, object item)
    Parameters
    Type Name Description
    int version

    the version number

    object item

    the data item, or null for a deleted item

    Properties

    | Edit this page View Source

    Item

    The data item, or null if this is a placeholder for a deleted item.

    Declaration
    public object Item { get; }
    Property Value
    Type Description
    object
    | Edit this page View Source

    Version

    The version number of this data, provided by the SDK.

    Declaration
    public int Version { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    Deleted(int)

    Shortcut for constructing a deleted item placeholder.

    Declaration
    public static DataStoreTypes.ItemDescriptor Deleted(int version)
    Parameters
    Type Name Description
    int version

    the version number

    Returns
    Type Description
    DataStoreTypes.ItemDescriptor

    the item descriptor

    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    ValueType.ToString()
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX