C++ Server-Side SDK
LaunchDarkly SDK
Loading...
Searching...
No Matches
Static Public Member Functions | Public Attributes | List of all members
launchdarkly::server_side::integrations::SerializedItemDescriptor Struct Reference

#include <serialized_item_descriptor.hpp>

Collaboration diagram for launchdarkly::server_side::integrations::SerializedItemDescriptor:
Collaboration graph
[legend]

Static Public Member Functions

static SerializedItemDescriptor Present (std::uint64_t const version, std::string data)
 Constructs a SerializedItemDescriptor from a version and a serialized item.
 
static SerializedItemDescriptor Tombstone (std::uint64_t const version, std::string tombstone_rep)
 Constructs a SerializedItemDescriptor from a version and a tombstone.
 

Public Attributes

std::uint64_t version
 
bool deleted
 
std::string serializedItem
 

Detailed Description

A versioned item which can be stored or loaded from a persistent store.

Member Function Documentation

◆ Present()

static SerializedItemDescriptor launchdarkly::server_side::integrations::SerializedItemDescriptor::Present ( std::uint64_t const  version,
std::string  data 
)
inlinestatic

Constructs a SerializedItemDescriptor from a version and a serialized item.

Parameters
versionVersion of item.
dataSerialized item.
Returns
SerializedItemDescriptor.

◆ Tombstone()

static SerializedItemDescriptor launchdarkly::server_side::integrations::SerializedItemDescriptor::Tombstone ( std::uint64_t const  version,
std::string  tombstone_rep 
)
inlinestatic

Constructs a SerializedItemDescriptor from a version and a tombstone.

This is used when an item is deleted: the tombstone can be stored in place of the item, and the version checked in the future. Without the tombstone, out-of-order data updates could "resurrect" a deleted item.

Parameters
versionVersion of the item.
tombstone_repSerialized tombstone representation of the item.
Returns
SerializedItemDescriptor.

Member Data Documentation

◆ deleted

bool launchdarkly::server_side::integrations::SerializedItemDescriptor::deleted

During an Init/Upsert, when this is true, the serializedItem will contain a tombstone representation. If the persistence implementation can efficiently store the deletion state, and version, then it may choose to discard the item.


The documentation for this struct was generated from the following file: