C++ Server-Side SDK
LaunchDarkly SDK
Loading...
Searching...
No Matches
Public Member Functions | List of all members
launchdarkly::server_side::data_systems::PollingDataSource Class Reference
Inheritance diagram for launchdarkly::server_side::data_systems::PollingDataSource:
Inheritance graph
[legend]
Collaboration diagram for launchdarkly::server_side::data_systems::PollingDataSource:
Collaboration graph
[legend]

Public Member Functions

 PollingDataSource (boost::asio::any_io_executor const &ioc, Logger const &logger, data_components::DataSourceStatusManager &status_manager, config::built::ServiceEndpoints const &endpoints, config::built::BackgroundSyncConfig::PollingConfig const &data_source_config, config::built::HttpProperties const &http_properties)
 
void StartAsync (data_interfaces::IDestination *dest, data_model::SDKDataSet const *bootstrap_data) override
 Starts synchronizing data into the given IDestination.
 
void ShutdownAsync (std::function< void()> completion) override
 Stops the synchronization mechanism. Stop will be called only once after StartAsync. Stop should not block, but should invoke the completion function once shutdown.
 
std::string const & Identity () const override
 
- Public Member Functions inherited from launchdarkly::server_side::data_interfaces::IDataSynchronizer
 IDataSynchronizer (IDataSynchronizer const &item)=delete
 
 IDataSynchronizer (IDataSynchronizer &&item)=delete
 
IDataSynchronizeroperator= (IDataSynchronizer const &)=delete
 
IDataSynchronizeroperator= (IDataSynchronizer &&)=delete
 

Member Function Documentation

◆ Identity()

std::string const & launchdarkly::server_side::data_systems::PollingDataSource::Identity ( ) const
overridevirtual
Returns
Identity of the synchronizer. Used in logs.

Implements launchdarkly::server_side::data_interfaces::IDataSynchronizer.

◆ ShutdownAsync()

void launchdarkly::server_side::data_systems::PollingDataSource::ShutdownAsync ( std::function< void()>  complete)
overridevirtual

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.

Implements launchdarkly::server_side::data_interfaces::IDataSynchronizer.

◆ StartAsync()

void launchdarkly::server_side::data_systems::PollingDataSource::StartAsync ( data_interfaces::IDestination destination,
data_model::SDKDataSet const *  bootstrap_data 
)
overridevirtual

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.

Implements launchdarkly::server_side::data_interfaces::IDataSynchronizer.


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