C++ Server-Side SDK
LaunchDarkly SDK
|
IDataSynchronizer obtains data via a background synchronization mechanism, updating an IDestination whenever changes arrive from upstream. More...
#include <idata_synchronizer.hpp>
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 | |
IDataSynchronizer & | operator= (IDataSynchronizer const &)=delete |
IDataSynchronizer & | operator= (IDataSynchronizer &&)=delete |
IDataSynchronizer obtains data via a background synchronization mechanism, updating an IDestination whenever changes arrive from upstream.
|
pure virtual |
Implemented in launchdarkly::server_side::data_systems::PollingDataSource, and launchdarkly::server_side::data_systems::StreamingDataSource.
|
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.
complete | A callback to be invoked on completion. |
Implemented in launchdarkly::server_side::data_systems::PollingDataSource, and launchdarkly::server_side::data_systems::StreamingDataSource.
|
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.
destination | The destination to synchronize data into. Pointer is invalid after the ShutdownAsync completion handler is called. |
bootstrap_data | Optional bootstrap data. Pointer is valid only for this call. |
Implemented in launchdarkly::server_side::data_systems::PollingDataSource, and launchdarkly::server_side::data_systems::StreamingDataSource.