pulsar-client-cpp
Loading...
Searching...
No Matches
pulsar::AutoClusterFailover Class Referencefinal
Inheritance diagram for pulsar::AutoClusterFailover:
pulsar::ServiceInfoProvider

Classes

struct  Config
class  Builder

Public Member Functions

 AutoClusterFailover (Config &&config)
ServiceInfo initialServiceInfo () final
void initialize (std::function< void(ServiceInfo)> onServiceInfoUpdate) final
Public Member Functions inherited from pulsar::ServiceInfoProvider
virtual ~ServiceInfoProvider ()=default

Member Function Documentation

◆ initialize()

void pulsar::AutoClusterFailover::initialize ( std::function< void(ServiceInfo)> onServiceInfoUpdate)
finalvirtual

Initialize the ServiceInfoProvider.

After the client has obtained the initial ServiceInfo via initialServiceInfo, this method is called to allow the provider to start any background work (for example, service discovery or watching configuration changes) and to report subsequent updates to the service information.

Parameters
onServiceInfoUpdatethe callback to deliver updated ServiceInfo values to the client after the initial connection has been established

Implementations may choose not to invoke onServiceInfoUpdate if the ServiceInfo never changes.

Implements pulsar::ServiceInfoProvider.

◆ initialServiceInfo()

ServiceInfo pulsar::AutoClusterFailover::initialServiceInfo ( )
finalvirtual

Get the initial ServiceInfo connection for the client. This method is called only once internally in Client::create() to get the initial ServiceInfo for the client to connect to the Pulsar service, typically before initialize is invoked. Since it's only called once, it's legal to return a moved ServiceInfo object to avoid unnecessary copying.

Implements pulsar::ServiceInfoProvider.


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