Apache Mesos
Public Member Functions | List of all members
mesos::master::contender::ZooKeeperMasterContender Class Reference

#include <zookeeper.hpp>

Inheritance diagram for mesos::master::contender::ZooKeeperMasterContender:
mesos::master::contender::MasterContender

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...
 

Constructor & Destructor Documentation

mesos::master::contender::ZooKeeperMasterContender::ZooKeeperMasterContender ( const zookeeper::URL url,
const Duration sessionTimeout = MASTER_CONTENDER_ZK_SESSION_TIMEOUT 
)
explicit
mesos::master::contender::ZooKeeperMasterContender::ZooKeeperMasterContender ( process::Owned< zookeeper::Group group)
explicit
mesos::master::contender::ZooKeeperMasterContender::~ZooKeeperMasterContender ( )
override

Member Function Documentation

process::Future<process::Future<Nothing> > mesos::master::contender::ZooKeeperMasterContender::contend ( )
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.

void mesos::master::contender::ZooKeeperMasterContender::initialize ( const MasterInfo &  masterInfo)
overridevirtual

Initializes the contender with the MasterInfo of the master it contends on behalf of.

Implements mesos::master::contender::MasterContender.


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