Samchon Framework for CPP
1.0.0
|
An array of ParallelClient(s). More...
#include <ParallelClientArray.hpp>
Public Member Functions | |
ParallelClientArray () | |
Default Constructor. More... | |
![]() | |
ParallelSystemArray () | |
Default Constructor. More... | |
void | sendSegmentData (std::shared_ptr< Invoke >, size_t) |
Send a message with segmentation size. More... | |
virtual void | sendPieceData (std::shared_ptr< Invoke >, size_t, size_t) |
Send a message with piece index and size. More... | |
![]() | |
ExternalSystemArray () | |
Default Constructor. More... | |
auto | hasRole (const std::string &) const -> bool |
Test whether has a role. More... | |
auto | getRole (const std::string &) const -> std::shared_ptr< ExternalSystemRole > |
Get a role. More... | |
virtual void | sendData (std::shared_ptr< Invoke >) override |
Sends an Invoke message to related ExternalSystem(s). More... | |
virtual void | replyData (std::shared_ptr< Invoke >) override |
Handle replied Invoke message. More... | |
virtual auto | TAG () const -> std::string override |
A tag name when represented by XML. More... | |
virtual auto | CHILD_TAG () const -> std::string override |
A tag name of children. More... | |
![]() | |
EntityGroup () | |
Default Constructor. More... | |
auto | has (const std::string &key) const -> bool |
Indicates whether a container has an object having the specified identifier. More... | |
auto | get (const std::string &key) -> value_type & |
Access the element by specified identifier(key). More... | |
auto | get (const std::string &key) const -> const value_type & |
Access the const element by specified identifier(key). More... | |
![]() | |
Entity () | |
Default Constructor. More... | |
virtual auto | key () const -> std::string |
Get a key that can identify the Entity uniquely. More... | |
![]() | |
IEntityGroup () | |
Default Constructor. More... | |
![]() | |
IProtocol () | |
Default Constructor. More... | |
![]() | |
ExternalClientArray () | |
Default Constructor. More... | |
virtual void | construct (std::shared_ptr< library::XML >) override |
Construct data of the Entity from an XML object. More... | |
virtual void | start () override |
Start interaction. More... | |
virtual auto | toXML () const -> std::shared_ptr< library::XML > override |
Get an XML object represents the EntityGroup. More... | |
Additional Inherited Members | |
![]() | |
virtual void | notifyEnd (PRMasterHistory *) |
Notify end of a master history. More... | |
![]() | |
virtual auto | createChild (std::shared_ptr< library::XML >) -> entity_type *=0 |
Factory method of a child Entity. More... | |
![]() | |
virtual auto | PORT () const -> int |
Port number of the server. More... | |
virtual auto | MY_IP () const -> std::string |
(optional) Server's IP More... | |
virtual void | addClient (Socket *) override |
Handling connection of a physical client. More... | |
![]() | |
std::string | myIP |
A custom ip address of my system to bind. More... | |
int | port |
A port number for accepting external clients. More... | |
An array of ParallelClient(s).
ParallelClientArray is an ParallelSystemArray specialized in clients' driver.
DistributedSystemArray class is an ExternalSystemArray and an abstract class containing and managing distributed system drivers within framework of master. The DistributedSystemArray class allocates DistributedSystemRole objects to DistributedSystem objects for optimization.
Unlike the ExternalSystemRole class which is dependent on an ExternalSystem, DistributedSystemRole is not dependent on a DistributedSystem and even can be allocated to multiple DistributedSystem objects. Allocation of DistributedSystemRole(s) to DistributedSystem(s) is determined by estimation of performance index pursuing best distribution. If number of DistributedSystem and DistributedSystemRole objects is not a lot, optimize by combined permuation algorithm. Else the objects are a lot, the allocation will be optimized by genetic algorithm.
ExternalSystemArray is an abstract class containing and managing external system drivers.
Also, ExternalSystemArray can access to ExternalSystemRole(s) directly. With the method, you can use an ExternalSystemRole as "logical proxy" of an ExternalSystem. Of course, the ExternalSystemRole is belonged to an ExternalSystem. However, if you access an ExternalSystemRole from an ExternalSystemArray directly, not passing by a belonged ExternalSystem, and send an Invoke message even you're not knowing which ExternalSystem is related in, the ExternalSystemRole acted a role of proxy.
It's called as "Proxy pattern". With the pattern, you can only concentrate on ExternalSystemRole itself, what to do with Invoke message, irrespective of the ExternalSystemRole is belonged to which ExternalSystem.
Definition at line 22 of file ParallelClientArray.hpp.
ParallelClientArray::ParallelClientArray | ( | ) |
Default Constructor.
Definition at line 8 of file ParallelClientArray.cpp.