Interface TransactionalDataStore


public interface TransactionalDataStore
Interface for a data store that holds feature flags and related data received by the SDK. This interface supports updating the store transactionally using ChangeSets.

Ordinarily, the only implementation of this interface is the default in-memory implementation, which holds references to actual SDK data model objects.

Implementations must be thread-safe.

See Also:
  • Method Details

    • apply

      void apply(@NonNull LDContext context, @NonNull ChangeSet<Map<String,DataModel.Flag>> changeSet)
      Apply the given change set to the store. This should be done atomically if possible. Implementations may ignore the update if the given context is no longer the active context.
      Parameters:
      context - the context that was used to obtain the changeset (e.g. for staleness checks)
      changeSet - the changeset to apply
    • getSelector

      @NonNull Selector getSelector()
      Returns the selector for the currently stored data. The selector will be non-null but may be empty.
      Returns:
      the selector for the currently stored data