Apache Mesos
|
#include <zookeeper.hpp>
Public Member Functions | |
ZooKeeperMasterContender (const zookeeper::URL &url, const Duration &sessionTimeout=MASTER_CONTENDER_ZK_SESSION_TIMEOUT) | |
ZooKeeperMasterContender (process::Owned< zookeeper::Group > group) | |
~ZooKeeperMasterContender () override | |
void | initialize (const MasterInfo &masterInfo) override |
Initializes the contender with the MasterInfo of the master it contends on behalf of. More... | |
process::Future< process::Future< Nothing > > | contend () override |
Returns a Future<Nothing> once the contender has entered the contest (by obtaining a membership) and an error otherwise. More... | |
Public Member Functions inherited from mesos::master::contender::MasterContender | |
virtual | ~MasterContender ()=0 |
Note that the contender's membership, if obtained, is scheduled to be cancelled during destruction. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from mesos::master::contender::MasterContender | |
static Try< MasterContender * > | create (const Option< std::string > &zk, const Option< std::string > &masterContenderModule=None(), const Option< Duration > &zkSessionTimeout=None()) |
Creates a master contender. More... | |
|
explicit |
|
explicit |
|
override |
|
overridevirtual |
Returns a Future<Nothing> once the contender has entered the contest (by obtaining a membership) and an error otherwise.
A failed future is returned if this method is called before initialize(). The inner Future returns Nothing when the contender is out of the contest (i.e. its membership is lost).
This method can be used to contend again after candidacy is obtained (the outer future satisfied), otherwise the future for the pending election is returned. Recontending after candidacy is obtained causes the previous candidacy to be withdrawn.
Implements mesos::master::contender::MasterContender.
|
overridevirtual |
Initializes the contender with the MasterInfo of the master it contends on behalf of.
Implements mesos::master::contender::MasterContender.