MySQL 8.3.0
Source Code Documentation
metadata_cache::ClusterStateNotifierInterface Class Referenceabstract

Abstract class that provides interface for adding and removing observers on cluster status changes. More...

#include <metadata_cache.h>

Inheritance diagram for metadata_cache::ClusterStateNotifierInterface:
[legend]

Public Member Functions

virtual void add_state_listener (ClusterStateListenerInterface *listener)=0
 Register observer that is notified when there is a change in the cluster nodes setup/state discovered. More...
 
virtual void remove_state_listener (ClusterStateListenerInterface *listener)=0
 Unregister observer previously registered with add_state_listener() More...
 
 ClusterStateNotifierInterface ()=default
 
 ClusterStateNotifierInterface (const ClusterStateNotifierInterface &)=delete
 
ClusterStateNotifierInterfaceoperator= (const ClusterStateNotifierInterface &)=delete
 
virtual ~ClusterStateNotifierInterface ()
 

Detailed Description

Abstract class that provides interface for adding and removing observers on cluster status changes.

When state of cluster is changed, then ClusterStateListenerInterface::notify function is called for every registered observer.

Constructor & Destructor Documentation

◆ ClusterStateNotifierInterface() [1/2]

metadata_cache::ClusterStateNotifierInterface::ClusterStateNotifierInterface ( )
default

◆ ClusterStateNotifierInterface() [2/2]

metadata_cache::ClusterStateNotifierInterface::ClusterStateNotifierInterface ( const ClusterStateNotifierInterface )
explicitdelete

◆ ~ClusterStateNotifierInterface()

metadata_cache::ClusterStateNotifierInterface::~ClusterStateNotifierInterface ( )
virtualdefault

Member Function Documentation

◆ add_state_listener()

virtual void metadata_cache::ClusterStateNotifierInterface::add_state_listener ( ClusterStateListenerInterface listener)
pure virtual

Register observer that is notified when there is a change in the cluster nodes setup/state discovered.

Parameters
listenerObserver object that is notified when cluster nodes state is changed.
Exceptions
std::runtime_errorif metadata cache not initialized

Implemented in metadata_cache::MetadataCacheAPI, metadata_cache::MetadataCacheAPIBase, and MetadataCache.

◆ operator=()

ClusterStateNotifierInterface & metadata_cache::ClusterStateNotifierInterface::operator= ( const ClusterStateNotifierInterface )
delete

◆ remove_state_listener()

virtual void metadata_cache::ClusterStateNotifierInterface::remove_state_listener ( ClusterStateListenerInterface listener)
pure virtual

Unregister observer previously registered with add_state_listener()

Parameters
listenerObserver object that should be unregistered.
Exceptions
std::runtime_errorif metadata cache not initialized

Implemented in metadata_cache::MetadataCacheAPI, metadata_cache::MetadataCacheAPIBase, and MetadataCache.


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