LaunchDarkly Dotnet Server SDK
Search Results for

    Show / Hide Table of Contents

    Interface IPersistentDataStoreAsync

    Interface for a data store that holds feature flags and related data in a serialized form.

    Inherited Members
    IDisposable.Dispose()
    Namespace: LaunchDarkly.Sdk.Server.Subsystems
    Assembly: LaunchDarkly.ServerSdk.dll
    Syntax
    public interface IPersistentDataStoreAsync : IDisposable
    Remarks

    This is exactly equivalent to IPersistentDataStore, but for implementations that use a task-based asynchronous pattern.

    Methods

    | Edit this page View Source

    GetAllAsync(DataKind)

    Equivalent to GetAll(DataKind).

    Declaration
    Task<DataStoreTypes.KeyedItems<DataStoreTypes.SerializedItemDescriptor>> GetAllAsync(DataStoreTypes.DataKind kind)
    Parameters
    Type Name Description
    DataStoreTypes.DataKind kind

    specifies which collection to use

    Returns
    Type Description
    Task<DataStoreTypes.KeyedItems<DataStoreTypes.SerializedItemDescriptor>>

    a collection of key-value pairs; the ordering is not significant

    | Edit this page View Source

    GetAsync(DataKind, string)

    Equivalent to Get(DataKind, string).

    Declaration
    Task<DataStoreTypes.SerializedItemDescriptor?> GetAsync(DataStoreTypes.DataKind kind, string key)
    Parameters
    Type Name Description
    DataStoreTypes.DataKind kind

    specifies which collection to use

    string key

    the unique key of the item within that collection

    Returns
    Type Description
    Task<DataStoreTypes.SerializedItemDescriptor?>

    a versioned item that contains the stored data (or placeholder for deleted data); null if the key is unknown

    | Edit this page View Source

    InitAsync(FullDataSet<SerializedItemDescriptor>)

    Equivalent to Init(FullDataSet<SerializedItemDescriptor>).

    Declaration
    Task InitAsync(DataStoreTypes.FullDataSet<DataStoreTypes.SerializedItemDescriptor> allData)
    Parameters
    Type Name Description
    DataStoreTypes.FullDataSet<DataStoreTypes.SerializedItemDescriptor> allData

    a list of DataStoreTypes.DataKind instances and their corresponding data sets

    Returns
    Type Description
    Task
    | Edit this page View Source

    InitializedAsync()

    Equivalent to Initialized().

    Declaration
    Task<bool> InitializedAsync()
    Returns
    Type Description
    Task<bool>
    | Edit this page View Source

    IsStoreAvailableAsync()

    Tests whether the data store seems to be functioning normally.

    Declaration
    Task<bool> IsStoreAvailableAsync()
    Returns
    Type Description
    Task<bool>

    true if the underlying data store is reachable

    Remarks

    This should not be a detailed test of different kinds of operations, but just the smallest possible operation to determine whether (for instance) we can reach the database.

    Whenever one of the store's other methods throws an exception, the SDK will assume that it may have become unavailable (e.g. the database connection was lost). The SDK will then call IsStoreAvailable() at intervals until it returns true.

    | Edit this page View Source

    UpsertAsync(DataKind, string, SerializedItemDescriptor)

    Equivalent to Upsert(DataKind, string, SerializedItemDescriptor).

    Declaration
    Task<bool> UpsertAsync(DataStoreTypes.DataKind kind, string key, DataStoreTypes.SerializedItemDescriptor item)
    Parameters
    Type Name Description
    DataStoreTypes.DataKind kind

    specifies which collection to use

    string key

    the unique key for the item within that collection

    DataStoreTypes.SerializedItemDescriptor item

    the item to insert or update

    Returns
    Type Description
    Task<bool>

    true if the item was updated; false if it was not updated because the store contains an equal or greater version

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX