Apache Mesos
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mesos::internal::master::Framework Struct Reference

#include <master.hpp>

Public Types

enum  State { RECOVERED, CONNECTED, DISCONNECTED }
 

Public Member Functions

 Framework (Master *const master, const Flags &masterFlags, const FrameworkInfo &info, const process::UPID &_pid, const process::Owned< ObjectApprovers > &objectApprovers, const process::Time &time=process::Clock::now())
 
 Framework (Master *const master, const Flags &masterFlags, const FrameworkInfo &info, const StreamingHttpConnection< v1::scheduler::Event > &_http, const process::Owned< ObjectApprovers > &objectApprovers, const process::Time &time=process::Clock::now())
 
 Framework (Master *const master, const Flags &masterFlags, const FrameworkInfo &info)
 
 ~Framework ()
 
Task * getTask (const TaskID &taskId)
 
void addTask (Task *task)
 
void recoverResources (Task *task)
 
template<typename Message >
void send (const Message &message)
 
void addCompletedTask (Task &&task)
 
void addUnreachableTask (const Task &task)
 
void removeTask (Task *task, bool unreachable)
 
void addOffer (Offer *offer)
 
void removeOffer (Offer *offer)
 
void addInverseOffer (InverseOffer *inverseOffer)
 
void removeInverseOffer (InverseOffer *inverseOffer)
 
bool hasExecutor (const SlaveID &slaveId, const ExecutorID &executorId)
 
void addExecutor (const SlaveID &slaveId, const ExecutorInfo &executorInfo)
 
void removeExecutor (const SlaveID &slaveId, const ExecutorID &executorId)
 
void addOperation (Operation *operation)
 
Option< Operation * > getOperation (const OperationID &id)
 
void recoverResources (Operation *operation)
 
void removeOperation (Operation *operation)
 
const FrameworkID id () const
 
void update (const FrameworkInfo &newInfo)
 
void updateConnection (const process::UPID &newPid, const process::Owned< ObjectApprovers > &objectApprovers)
 
void updateConnection (const StreamingHttpConnection< v1::scheduler::Event > &newHttp, const process::Owned< ObjectApprovers > &objectApprovers)
 
bool disconnect ()
 
bool activate ()
 
bool deactivate ()
 
void heartbeat ()
 
bool active () const
 
bool connected () const
 
bool recovered () const
 
bool isTrackedUnderRole (const std::string &role) const
 
void trackUnderRole (const std::string &role)
 
void untrackUnderRole (const std::string &role)
 
const Option< StreamingHttpConnection< v1::scheduler::Event > > & http () const
 
const Option< process::UPID > & pid () const
 
Try< bool > approved (const authorization::ActionObject &actionObject) const
 

Static Public Member Functions

static process::Future< process::Owned< ObjectApprovers > > createObjectApprovers (const Option< Authorizer * > &_authorizer, const FrameworkInfo &frameworkInfo)
 

Public Attributes

Master *const master
 
FrameworkInfo info
 
std::set< std::string > roles
 
protobuf::framework::Capabilities capabilities
 
process::Time registeredTime
 
process::Time reregisteredTime
 
process::Time unregisteredTime
 
hashmap< TaskID, Task * > tasks
 
circular_buffer< process::Owned< Task > > completedTasks
 
BoundedHashMap< TaskID, process::Owned< Task > > unreachableTasks
 
hashset< Offer * > offers
 
hashset< InverseOffer * > inverseOffers
 
hashmap< SlaveID, hashmap< ExecutorID, ExecutorInfo > > executors
 
hashmap< UUID, Operation * > operations
 
hashmap< OperationID, UUID > operationUUIDs
 
Resources totalUsedResources
 
hashmap< SlaveID, ResourcesusedResources
 
Resources totalOfferedResources
 
hashmap< SlaveID, ResourcesofferedResources
 
FrameworkMetrics metrics
 

Member Enumeration Documentation

Enumerator
RECOVERED 
CONNECTED 
DISCONNECTED 

Constructor & Destructor Documentation

mesos::internal::master::Framework::Framework ( Master *const  master,
const Flags masterFlags,
const FrameworkInfo &  info,
const process::UPID _pid,
const process::Owned< ObjectApprovers > &  objectApprovers,
const process::Time time = process::Clock::now() 
)
mesos::internal::master::Framework::Framework ( Master *const  master,
const Flags masterFlags,
const FrameworkInfo &  info,
const StreamingHttpConnection< v1::scheduler::Event > &  _http,
const process::Owned< ObjectApprovers > &  objectApprovers,
const process::Time time = process::Clock::now() 
)
mesos::internal::master::Framework::Framework ( Master *const  master,
const Flags masterFlags,
const FrameworkInfo &  info 
)
mesos::internal::master::Framework::~Framework ( )

Member Function Documentation

bool mesos::internal::master::Framework::activate ( )
bool mesos::internal::master::Framework::active ( ) const
inline
void mesos::internal::master::Framework::addCompletedTask ( Task &&  task)
void mesos::internal::master::Framework::addExecutor ( const SlaveID &  slaveId,
const ExecutorInfo &  executorInfo 
)
void mesos::internal::master::Framework::addInverseOffer ( InverseOffer *  inverseOffer)
void mesos::internal::master::Framework::addOffer ( Offer *  offer)
void mesos::internal::master::Framework::addOperation ( Operation *  operation)
void mesos::internal::master::Framework::addTask ( Task *  task)
void mesos::internal::master::Framework::addUnreachableTask ( const Task &  task)
Try<bool> mesos::internal::master::Framework::approved ( const authorization::ActionObject actionObject) const
bool mesos::internal::master::Framework::connected ( ) const
inline
static process::Future<process::Owned<ObjectApprovers> > mesos::internal::master::Framework::createObjectApprovers ( const Option< Authorizer * > &  _authorizer,
const FrameworkInfo &  frameworkInfo 
)
static
bool mesos::internal::master::Framework::deactivate ( )
bool mesos::internal::master::Framework::disconnect ( )
Option<Operation*> mesos::internal::master::Framework::getOperation ( const OperationID &  id)
Task* mesos::internal::master::Framework::getTask ( const TaskID &  taskId)
bool mesos::internal::master::Framework::hasExecutor ( const SlaveID &  slaveId,
const ExecutorID &  executorId 
)
void mesos::internal::master::Framework::heartbeat ( )
const Option<StreamingHttpConnection<v1::scheduler::Event> >& mesos::internal::master::Framework::http ( ) const
inline
const FrameworkID mesos::internal::master::Framework::id ( ) const
inline
bool mesos::internal::master::Framework::isTrackedUnderRole ( const std::string &  role) const
const Option<process::UPID>& mesos::internal::master::Framework::pid ( ) const
inline
bool mesos::internal::master::Framework::recovered ( ) const
inline
void mesos::internal::master::Framework::recoverResources ( Task *  task)
void mesos::internal::master::Framework::recoverResources ( Operation *  operation)
void mesos::internal::master::Framework::removeExecutor ( const SlaveID &  slaveId,
const ExecutorID &  executorId 
)
void mesos::internal::master::Framework::removeInverseOffer ( InverseOffer *  inverseOffer)
void mesos::internal::master::Framework::removeOffer ( Offer *  offer)
void mesos::internal::master::Framework::removeOperation ( Operation *  operation)
void mesos::internal::master::Framework::removeTask ( Task *  task,
bool  unreachable 
)
template<typename Message >
void mesos::internal::master::Framework::send ( const Message &  message)
void mesos::internal::master::Framework::trackUnderRole ( const std::string &  role)
void mesos::internal::master::Framework::untrackUnderRole ( const std::string &  role)
void mesos::internal::master::Framework::update ( const FrameworkInfo &  newInfo)
void mesos::internal::master::Framework::updateConnection ( const process::UPID newPid,
const process::Owned< ObjectApprovers > &  objectApprovers 
)
void mesos::internal::master::Framework::updateConnection ( const StreamingHttpConnection< v1::scheduler::Event > &  newHttp,
const process::Owned< ObjectApprovers > &  objectApprovers 
)

Member Data Documentation

protobuf::framework::Capabilities mesos::internal::master::Framework::capabilities
circular_buffer<process::Owned<Task> > mesos::internal::master::Framework::completedTasks
hashmap<SlaveID, hashmap<ExecutorID, ExecutorInfo> > mesos::internal::master::Framework::executors
FrameworkInfo mesos::internal::master::Framework::info
hashset<InverseOffer*> mesos::internal::master::Framework::inverseOffers
Master* const mesos::internal::master::Framework::master
FrameworkMetrics mesos::internal::master::Framework::metrics
hashmap<SlaveID, Resources> mesos::internal::master::Framework::offeredResources
hashset<Offer*> mesos::internal::master::Framework::offers
hashmap<UUID, Operation*> mesos::internal::master::Framework::operations
hashmap<OperationID, UUID> mesos::internal::master::Framework::operationUUIDs
process::Time mesos::internal::master::Framework::registeredTime
process::Time mesos::internal::master::Framework::reregisteredTime
std::set<std::string> mesos::internal::master::Framework::roles
hashmap<TaskID, Task*> mesos::internal::master::Framework::tasks
Resources mesos::internal::master::Framework::totalOfferedResources
Resources mesos::internal::master::Framework::totalUsedResources
BoundedHashMap<TaskID, process::Owned<Task> > mesos::internal::master::Framework::unreachableTasks
process::Time mesos::internal::master::Framework::unregisteredTime
hashmap<SlaveID, Resources> mesos::internal::master::Framework::usedResources

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