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

IDataSynchronizer obtains data via a background synchronization mechanism, updating an IDestination whenever changes arrive from upstream. More...

#include <idata_synchronizer.hpp>

Inheritance diagram for launchdarkly::server_side::data_interfaces::IDataSynchronizer:
Inheritance graph
[legend]

Public Member Functions

virtual void StartAsync (IDestination *destination, data_model::SDKDataSet const *bootstrap_data)=0
 Starts synchronizing data into the given IDestination.
 
virtual void ShutdownAsync (std::function< void()> complete)=0
 Stops the synchronization mechanism. Stop will be called only once after StartAsync. Stop should not block, but should invoke the completion function once shutdown.
 
virtual std::string const & Identity () const =0
 
 IDataSynchronizer (IDataSynchronizer const &item)=delete
 
 IDataSynchronizer (IDataSynchronizer &&item)=delete
 
IDataSynchronizeroperator= (IDataSynchronizer const &)=delete
 
IDataSynchronizeroperator= (IDataSynchronizer &&)=delete
 

Detailed Description

IDataSynchronizer obtains data via a background synchronization mechanism, updating an IDestination whenever changes arrive from upstream.

Member Function Documentation

◆ Identity()

virtual std::string const & launchdarkly::server_side::data_interfaces::IDataSynchronizer::Identity ( ) const
pure virtual

◆ ShutdownAsync()

virtual void launchdarkly::server_side::data_interfaces::IDataSynchronizer::ShutdownAsync ( std::function< void()>  complete)
pure virtual

Stops the synchronization mechanism. Stop will be called only once after StartAsync. Stop should not block, but should invoke the completion function once shutdown.

Parameters
completeA callback to be invoked on completion.

Implemented in launchdarkly::server_side::data_systems::PollingDataSource, and launchdarkly::server_side::data_systems::StreamingDataSource.

◆ StartAsync()

virtual void launchdarkly::server_side::data_interfaces::IDataSynchronizer::StartAsync ( IDestination destination,
data_model::SDKDataSet const *  bootstrap_data 
)
pure virtual

Starts synchronizing data into the given IDestination.

The second parameter, boostrap_data, may be nullptr meaning no bootstrap data is present in the SDK and a full synchronization must be initiated.

If bootstrap_data is not nullptr, then it contains data obtained by the SDK during the bootstrap process. The pointer is valid only for this call.

The data may be used to optimize the synchronization process, e.g. by obtaining a diff rather than a full dataset.

Parameters
destinationThe destination to synchronize data into. Pointer is invalid after the ShutdownAsync completion handler is called.
bootstrap_dataOptional bootstrap data. Pointer is valid only for this call.

Implemented in launchdarkly::server_side::data_systems::PollingDataSource, and launchdarkly::server_side::data_systems::StreamingDataSource.


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