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

#include <master.hpp>

Public Types

enum  State { RECOVERED, DISCONNECTED, INACTIVE, ACTIVE }
 

Public Member Functions

 Framework (Master *const master, const Flags &masterFlags, const FrameworkInfo &info, const process::UPID &_pid, const process::Time &time=process::Clock::now())
 
 Framework (Master *const master, const Flags &masterFlags, const FrameworkInfo &info, const HttpConnection &_http, 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)
 
void updateConnection (const HttpConnection &newHttp)
 
void closeHttpConnection ()
 
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)
 
void setFrameworkState (const State &_state)
 

Public Attributes

Master *const master
 
FrameworkInfo info
 
std::set< std::string > roles
 
protobuf::framework::Capabilities capabilities
 
Option< HttpConnectionhttp
 
Option< process::UPIDpid
 
State state
 
process::Time registeredTime
 
process::Time reregisteredTime
 
process::Time unregisteredTime
 
hashmap< TaskID, TaskInfo > pendingTasks
 
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
 
Option< process::Owned< Heartbeater< mesos::scheduler::Event, v1::scheduler::Event > > > heartbeater
 
FrameworkMetrics metrics
 

Member Enumeration Documentation

Enumerator
RECOVERED 
DISCONNECTED 
INACTIVE 
ACTIVE 

Constructor & Destructor Documentation

mesos::internal::master::Framework::Framework ( Master *const  master,
const Flags masterFlags,
const FrameworkInfo &  info,
const process::UPID _pid,
const process::Time time = process::Clock::now() 
)
mesos::internal::master::Framework::Framework ( Master *const  master,
const Flags masterFlags,
const FrameworkInfo &  info,
const HttpConnection _http,
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::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)
void mesos::internal::master::Framework::closeHttpConnection ( )
bool mesos::internal::master::Framework::connected ( ) const
inline
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 FrameworkID mesos::internal::master::Framework::id ( ) const
inline
bool mesos::internal::master::Framework::isTrackedUnderRole ( const std::string &  role) const
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::setFrameworkState ( const State _state)
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)
void mesos::internal::master::Framework::updateConnection ( const HttpConnection newHttp)

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
Option<process::Owned< Heartbeater<mesos::scheduler::Event, v1::scheduler::Event> > > mesos::internal::master::Framework::heartbeater
Option<HttpConnection> mesos::internal::master::Framework::http
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
hashmap<TaskID, TaskInfo> mesos::internal::master::Framework::pendingTasks
Option<process::UPID> mesos::internal::master::Framework::pid
process::Time mesos::internal::master::Framework::registeredTime
process::Time mesos::internal::master::Framework::reregisteredTime
std::set<std::string> mesos::internal::master::Framework::roles
State mesos::internal::master::Framework::state
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: