Quick Links: |
#include <bmqa_manualhosthealthmonitor.h>
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 |
typedef bsl::function<void(bmqt::HostHealthState::Enum)> bmqpi::HostHealthMonitor::HostHealthChangeFn [inherited] |
Invoked as a response to the HostHealthMonitor detecting a change in the state of the host health.
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.
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.