Apache Mesos
Public Member Functions | List of all members
mesos::master::detector::StandaloneMasterDetector Class Reference

#include <standalone.hpp>

Inheritance diagram for mesos::master::detector::StandaloneMasterDetector:
mesos::master::detector::MasterDetector

Public Member Functions

 StandaloneMasterDetector ()
 
 StandaloneMasterDetector (const MasterInfo &leader)
 
 StandaloneMasterDetector (const process::UPID &leader)
 
virtual ~StandaloneMasterDetector ()
 
void appoint (const Option< MasterInfo > &leader)
 
void appoint (const process::UPID &leader)
 
virtual process::Future
< Option< MasterInfo > > 
detect (const Option< MasterInfo > &previous=None())
 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...
 

Constructor & Destructor Documentation

mesos::master::detector::StandaloneMasterDetector::StandaloneMasterDetector ( )
mesos::master::detector::StandaloneMasterDetector::StandaloneMasterDetector ( const MasterInfo &  leader)
explicit
mesos::master::detector::StandaloneMasterDetector::StandaloneMasterDetector ( const process::UPID leader)
explicit
virtual mesos::master::detector::StandaloneMasterDetector::~StandaloneMasterDetector ( )
virtual

Member Function Documentation

void mesos::master::detector::StandaloneMasterDetector::appoint ( const Option< MasterInfo > &  leader)
void mesos::master::detector::StandaloneMasterDetector::appoint ( const process::UPID leader)
virtual process::Future<Option<MasterInfo> > mesos::master::detector::StandaloneMasterDetector::detect ( const Option< MasterInfo > &  previous = None())
virtual

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.


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