Quick Links:

bmqa | bmqpi | bmqt

Public Types | Public Member Functions

bmqa::ManualHostHealthMonitor Class Reference

#include <bmqa_manualhosthealthmonitor.h>

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

List of all members.

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
bdlmt::SignalerConnection observeHostHealth (const HostHealthChangeFn &cb) BSLS_KEYWORD_OVERRIDE
void setState (bmqt::HostHealthState::Enum newState)
bmqt::HostHealthState::Enum hostState () const BSLS_KEYWORD_OVERRIDE

Member Typedef Documentation

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


Constructor & Destructor Documentation

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.

bmqa::ManualHostHealthMonitor::~ManualHostHealthMonitor (  ) 

Destructor.


Member Function Documentation

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

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

Implements bmqpi::HostHealthMonitor.

void bmqa::ManualHostHealthMonitor::setState ( bmqt::HostHealthState::Enum  newState  ) 
bmqt::HostHealthState::Enum bmqa::ManualHostHealthMonitor::hostState (  )  const [virtual]

Queries the current health of the host.

Implements bmqpi::HostHealthMonitor.


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