Samchon Framework for CPP  1.0.0
ParallelSlaveSystemMediator.cpp
1 #include <samchon/protocol/master/ParallelSlaveSystemMediator.hpp>
2 
3 #include <samchon/protocol/master/ParallelSystemArrayMediator.hpp>
4 
5 #include <samchon/protocol/Invoke.hpp>
6 
7 using namespace std;
8 using namespace samchon::library;
9 using namespace samchon::protocol;
10 using namespace samchon::protocol::master;
11 
12 ParallelSlaveSystemMediator::ParallelSlaveSystemMediator()
13  : super()
14 {
15  master = nullptr;
16 }
17 void ParallelSlaveSystemMediator::replyPieceData(shared_ptr<Invoke> invoke, size_t index, size_t size)
18 {
19  if (master == nullptr)
20  return;
21 
22  invoke->erase("invoke_history_index");
23  invoke->erase("invoke_history_size");
24  master->sendPieceData(invoke, index, size);
25 }
26 
27 auto ParallelSlaveSystemMediator::TAG() const -> string
28 {
29  return "slave";
30 }
virtual auto TAG() const -> std::string override
A tag name when represented by XML.
Package for external system, within the framework of master.
Definition: RWMutex.hpp:4
Package of libraries.
Definition: library.hpp:84
virtual void replyPieceData(std::shared_ptr< Invoke >, size_t, size_t) override
Handle requested processes which are segmented.
An Entity and a container of children Entity objects.
Definition: EntityGroup.hpp:52
virtual void sendPieceData(std::shared_ptr< Invoke >, size_t, size_t)
Send a message with piece index and size.
Package of network protocol and libraries.
Definition: protocol.hpp:185
ParallelSystemArrayMediator * master
A master system for mediation.