17 #ifndef __MASTER_ALLOCATOR_MESOS_SORTER_SORTER_HPP__ 18 #define __MASTER_ALLOCATOR_MESOS_SORTER_SORTER_HPP__ 52 const std::string& metricsPrefix) {}
58 const Option<std::set<std::string>>& fairnessExcludeResourceNames) = 0;
63 virtual void add(
const std::string& client) = 0;
66 virtual void remove(
const std::string& client) = 0;
70 virtual void activate(
const std::string& client) = 0;
74 virtual void deactivate(
const std::string& client) = 0;
87 const std::string& client,
88 const SlaveID& slaveId,
96 const std::string& client,
97 const SlaveID& slaveId,
103 const std::string& client,
104 const SlaveID& slaveId,
109 const std::string& client)
const = 0;
114 const std::string& client)
const = 0;
120 const std::string& client,
121 const SlaveID& slaveId)
const = 0;
132 const SlaveID& slaveId,
135 virtual void removeSlave(
const SlaveID& slaveId) = 0;
139 virtual std::vector<std::string>
sort() = 0;
143 virtual bool contains(
const std::string& client)
const = 0;
147 virtual size_t count()
const = 0;
156 #endif // __MASTER_ALLOCATOR_MESOS_SORTER_SORTER_HPP__
virtual void removeSlave(const SlaveID &slaveId)=0
virtual void unallocated(const std::string &client, const SlaveID &slaveId, const Resources &resources)=0
Definition: option.hpp:29
Sorter(const process::UPID &allocator, const std::string &metricsPrefix)
Definition: sorter.hpp:50
virtual ~Sorter()=default
Definition: master.hpp:27
Definition: resource_quantities.hpp:63
Definition: resources.hpp:83
virtual void initialize(const Option< std::set< std::string >> &fairnessExcludeResourceNames)=0
virtual const hashmap< SlaveID, Resources > & allocation(const std::string &client) const =0
virtual void update(const std::string &client, const SlaveID &slaveId, const Resources &oldAllocation, const Resources &newAllocation)=0
virtual void updateWeight(const std::string &path, double weight)=0
virtual const ResourceQuantities & allocationScalarQuantities() const =0
Definition: hashmap.hpp:38
An "untyped" PID, used to encapsulate the process ID for lower-layer abstractions (eg...
Definition: pid.hpp:39
virtual bool contains(const std::string &client) const =0
Definition: attributes.hpp:24
virtual void add(const std::string &client)=0
Definition: sorter.hpp:42
virtual std::vector< std::string > sort()=0
virtual void addSlave(const SlaveID &slaveId, const ResourceQuantities &scalarQuantities)=0
virtual void activate(const std::string &client)=0
virtual size_t count() const =0
virtual void deactivate(const std::string &client)=0
virtual void allocated(const std::string &client, const SlaveID &slaveId, const Resources &resources)=0