3 #include <NodeInfo.pb.h> 4 #include <TaskInfo.pb.h> 24 std::string
uuid()
const;
27 std::shared_ptr<Socket>
pipe()
const;
44 virtual void onEnter(
Message * pInMsg, std::vector<std::string> & out, std::string type);
45 virtual void onExit(
Message * pInMsg, std::vector<std::string> & out);
50 std::shared_ptr<Socket>
mpPipe =
nullptr;
52 std::map<std::string, std::string>
mOthers{};
std::string mUUID
Self UUID.
NodeInfo * nodeInfo() const
virtual void onEnter(Message *pInMsg, std::vector< std::string > &out, std::string type)
TODO Three horsemen of apocalypse.
void addOther(std::string uuid, std::string type)
std::shared_ptr< Socket > mpPipe
Pipe for messages (net connector)
NodeManager * mpNodeManager
Node Manager.
std::map< std::string, std::string > mOthers
List of others.
std::map< std::string, std::string > mClients
List of clients.
virtual void onWhisper(Message *pInMsg, std::vector< std::string > &out)
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.
void print() const
TODO Prints distributor's state.
std::string uuid() const
Returns distributor's UUID.
Distributor(std::string uuid, std::shared_ptr< Socket > pPipe, NodeManager *pNM)
TaskInfo mTaskInfoCache
Task Info cache.
void addClient(std::string uuid, std::string type)
void removeClient(std::string uuid)
void removeOther(std::string uuid)