C++ Server-Side SDK
LaunchDarkly SDK
|
#include <background_sync_system.hpp>
Public Member Functions | |
BackgroundSync (config::built::ServiceEndpoints const &endpoints, config::built::BackgroundSyncConfig const &background_sync_config, config::built::HttpProperties http_properties, boost::asio::any_io_executor ioc, data_components::DataSourceStatusManager &status_manager, Logger const &logger) | |
BackgroundSync (BackgroundSync const &item)=delete | |
BackgroundSync (BackgroundSync &&item)=delete | |
BackgroundSync & | operator= (BackgroundSync const &)=delete |
BackgroundSync & | operator= (BackgroundSync &&)=delete |
std::shared_ptr< data_model::FlagDescriptor > | GetFlag (std::string const &key) const override |
Get the flag named by key. Returns nullptr if no such flag exists. | |
std::shared_ptr< data_model::SegmentDescriptor > | GetSegment (std::string const &key) const override |
Get the segment named by key. Returns nullptr if no such flag exists. | |
std::unordered_map< std::string, std::shared_ptr< data_model::FlagDescriptor > > | AllFlags () const override |
Get a map of all flags. | |
std::unordered_map< std::string, std::shared_ptr< data_model::SegmentDescriptor > > | AllSegments () const override |
Get a map of all segments. | |
std::string const & | Identity () const override |
void | Initialize () override |
Initializes the system. This method will be called before any of the IStore methods are called. | |
bool | Initialized () const override |
![]() | |
IDataSystem (IDataSystem const &item)=delete | |
IDataSystem (IDataSystem &&item)=delete | |
IDataSystem & | operator= (IDataSystem const &)=delete |
IDataSystem & | operator= (IDataSystem &&)=delete |
![]() | |
IStore (IStore const &item)=delete | |
IStore (IStore &&item)=delete | |
IStore & | operator= (IStore const &)=delete |
IStore & | operator= (IStore &&)=delete |
BackgroundSync implements the standard Data System which receives data updates from LaunchDarkly as they happen. It updates an in-memory store with the data, and always operates with a complete dataset.
The BackgroundSync system is advantageous because it allows flag evaluations to take place with up-to-date information. However, some environments may be too large to fit in memory, or a direct connection to LaunchDarkly isn't desired, necessitating use of the alternate LazyLoad system.
|
overridevirtual |
Get a map of all flags.
Implements launchdarkly::server_side::data_interfaces::IStore.
|
overridevirtual |
Get a map of all segments.
Implements launchdarkly::server_side::data_interfaces::IStore.
|
overridevirtual |
Get the flag named by key. Returns nullptr if no such flag exists.
key | Key of the flag. |
Implements launchdarkly::server_side::data_interfaces::IStore.
|
overridevirtual |
Get the segment named by key. Returns nullptr if no such flag exists.
key | Key of the segment. |
Implements launchdarkly::server_side::data_interfaces::IStore.
|
overridevirtual |
Implements launchdarkly::server_side::data_interfaces::IDataSystem.
|
overridevirtual |
Initializes the system. This method will be called before any of the IStore methods are called.
Implements launchdarkly::server_side::data_interfaces::IDataSystem.
|
overridevirtual |
Implements launchdarkly::server_side::data_interfaces::IStore.