C++ Server-Side SDK
LaunchDarkly SDK
Loading...
Searching...
No Matches
Public Member Functions | List of all members
launchdarkly::server_side::integrations::ISerializedItemKind Class Referenceabstract

Represents the kind of a serialized item. The purpose of this interface is to allow for determining a serialized item's version without leaking the details of the serialization format to the calling code. More...

#include <iserialized_item_kind.hpp>

Inheritance diagram for launchdarkly::server_side::integrations::ISerializedItemKind:
Inheritance graph
[legend]

Public Member Functions

virtual std::string const & Namespace () const =0
 
virtual std::uint64_t Version (std::string const &data) const =0
 
 ISerializedItemKind (ISerializedItemKind const &item)=delete
 
 ISerializedItemKind (ISerializedItemKind &&item)=delete
 
ISerializedItemKindoperator= (ISerializedItemKind const &)=delete
 
ISerializedItemKindoperator= (ISerializedItemKind &&)=delete
 

Detailed Description

Represents the kind of a serialized item. The purpose of this interface is to allow for determining a serialized item's version without leaking the details of the serialization format to the calling code.

Member Function Documentation

◆ Namespace()

virtual std::string const & launchdarkly::server_side::integrations::ISerializedItemKind::Namespace ( ) const
pure virtual

◆ Version()

virtual std::uint64_t launchdarkly::server_side::integrations::ISerializedItemKind::Version ( std::string const &  data) const
pure virtual

Deserialize data and return the version of the data.

This is for cases where the persistent store cannot avoid deserializing data to determine its version. For instance a Redis store where the only columns are the prefixed key and the serialized data.

If the data cannot be deserialized, then 0 will be returned.

Parameters
dataThe data to deserialize.
Returns
The version of the data.

Implemented in launchdarkly::server_side::integrations::SegmentKind, and launchdarkly::server_side::integrations::FlagKind.


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