libbmq  a5f8a06ba1d16cb5a65643e1fa7f1a1d6aadef40
BloombergLP::bmqa::ManualHostHealthMonitor Class Reference

#include <bmqa_manualhosthealthmonitor.h>

Inheritance diagram for BloombergLP::bmqa::ManualHostHealthMonitor:
BloombergLP::bmqpi::HostHealthMonitor

Public Types

typedef bsl::function< void(bmqt::HostHealthState::Enum)> HostHealthChangeFn
 

Public Member Functions

 ManualHostHealthMonitor (bmqt::HostHealthState::Enum initialState, bslma::Allocator *allocator=0)
 
 ~ManualHostHealthMonitor () BSLS_KEYWORD_OVERRIDE
 Destructor. More...
 
bdlmt::SignalerConnection observeHostHealth (const HostHealthChangeFn &cb) BSLS_KEYWORD_OVERRIDE
 
void setState (bmqt::HostHealthState::Enum newState)
 
bmqt::HostHealthState::Enum hostState () const BSLS_KEYWORD_OVERRIDE
 Queries the current health of the host. More...
 

Member Typedef Documentation

◆ HostHealthChangeFn

Invoked as a response to the HostHealthMonitor detecting a change in the state of the host health.

Constructor & Destructor Documentation

◆ ManualHostHealthMonitor()

BloombergLP::bmqa::ManualHostHealthMonitor::ManualHostHealthMonitor ( bmqt::HostHealthState::Enum  initialState,
bslma::Allocator *  allocator = 0 
)

Constructs a ManualHostHealthMonitor with the given initial state. Optionally specify an allocator to supply memory. If allocator is 0, the currently installed default allocator is used.

◆ ~ManualHostHealthMonitor()

BloombergLP::bmqa::ManualHostHealthMonitor::~ManualHostHealthMonitor ( )

Member Function Documentation

◆ observeHostHealth()

bdlmt::SignalerConnection BloombergLP::bmqa::ManualHostHealthMonitor::observeHostHealth ( const HostHealthChangeFn cb)
virtual

Registers the specified cb to be invoked each time the health of the host changes.

Implements BloombergLP::bmqpi::HostHealthMonitor.

◆ setState()

void BloombergLP::bmqa::ManualHostHealthMonitor::setState ( bmqt::HostHealthState::Enum  newState)

◆ hostState()

bmqt::HostHealthState::Enum BloombergLP::bmqa::ManualHostHealthMonitor::hostState ( ) const
virtual

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