1 #include "Distributor.hh"
4 :
Object(), mUUID(uuid), mpPipe(pipe), mpNodeManager(pNodeMan)
55 SPD_DEBUG(
"clients [{}] others [{}] pipe [{}]",
mClients.size(),
mOthers.size(),
static_cast<void *
>(
mpPipe.get()));
89 return std::move(
mUUID);
117 h[
"uuid"] = hh.uuid();
118 h[
"hostname"] = hh.hostname();
119 h[
"slots"] = hh.slots();
virtual void onWhisper(Message *pInMsg, std::vector< std::string > &out)
std::map< std::string, std::string > mClients
List of clients.
Json::Value mJsonValue
Node Info as json value.
NodeInfo * nodeInfo() const
std::map< std::string, std::string > mOthers
List of others.
void addClient(std::string uuid, std::string type)
virtual void upadateJsonValueNodeInfo()
std::string mUUID
Self UUID.
void removeClient(std::string uuid)
void print() const
TODO Prints distributor's state.
std::shared_ptr< Socket > mpPipe
Pipe for messages (net connector)
void addOther(std::string uuid, std::string type)
virtual void onEnter(Message *pInMsg, std::vector< std::string > &out, std::string type)
TODO Three horsemen of apocalypse.
void removeOther(std::string uuid)
virtual void onExit(Message *pInMsg, std::vector< std::string > &out)
std::shared_ptr< Socket > pipe() const
TODO Returns distributor's pipe?
NodeInfo * mpNodeInfo
Node Info.
std::string uuid() const
Returns distributor's UUID.
Distributor(std::string uuid, std::shared_ptr< Socket > pPipe, NodeManager *pNM)