Apache Mesos
|
#include <zookeeper.hpp>
Public Member Functions | |
ZooKeeperMasterDetector (const zookeeper::URL &url, const Duration &sessionTimeout=MASTER_DETECTOR_ZK_SESSION_TIMEOUT) | |
ZooKeeperMasterDetector (process::Owned< zookeeper::Group > group) | |
~ZooKeeperMasterDetector () override | |
process::Future< Option< MasterInfo > > | detect (const Option< MasterInfo > &previous=None()) override |
Returns MasterInfo after an election has occurred and the elected master is different than that specified (if any), or NONE if an election occurs and no master is elected (e.g., all masters are lost). More... | |
Public Member Functions inherited from mesos::master::detector::MasterDetector | |
virtual | ~MasterDetector ()=0 |
Additional Inherited Members | |
Static Public Member Functions inherited from mesos::master::detector::MasterDetector | |
static Try< MasterDetector * > | create (const Option< std::string > &zk, const Option< std::string > &masterDetectorModule=None(), const Option< Duration > &zkSessionTimeout=None()) |
Creates a master detector. More... | |
|
explicit |
|
explicit |
|
override |
|
overridevirtual |
Returns MasterInfo after an election has occurred and the elected master is different than that specified (if any), or NONE if an election occurs and no master is elected (e.g., all masters are lost).
A failed future is returned if the detector is unable to detect the leading master due to a non-retryable error. Note that the detector transparently tries to recover from retryable errors. The future is never discarded unless it stays pending when the detector destructs.
The 'previous' result (if any) should be passed back if this method is called repeatedly so the detector only returns when it gets a different result.
Implements mesos::master::detector::MasterDetector.