Samchon Framework for CPP  1.0.0
samchon::templates::parallel::MediatorSystem Class Referenceabstract

#include <MediatorSystem.hpp>

Collaboration diagram for samchon::templates::parallel::MediatorSystem:

Public Member Functions

 MediatorSystem (external::base::ExternalSystemArrayBase *systemArray)
 
virtual ~MediatorSystem ()=default
 
virtual void start ()=0
 
template<class SystemArray >
auto getSystemArray () const -> SystemArray *
 
- Public Member Functions inherited from samchon::protocol::IProtocol
virtual void replyData (std::shared_ptr< Invoke >)=0
 
virtual void sendData (std::shared_ptr< Invoke >)=0
 

Detailed Description

A mediator, the master driver.

The MediatorSystem is an abstract class helping ParallelSystemArrayMediator can be a slave system. The MediatorSystem interacts and communicates with the master system as a role of slave.

This MediatorSystem object is created in ParallelSystemArrayMediator.createMediator. Override the method and return one of them, which are derived from this MediatorSystem class, considering which type and protocol the master system follows:

When the master orders a parallel process to this slave, then the MediatorSystem delivers the parallel process to its parent ParallelSystemArrayMediator object. The ParallelSystemArrayMediator object distributes the parallel process to its slaves system, ParallelSystem objects. When the parallel process has completed, then MediatorSystem reports the result to its master.

Class Diagram

Templates - Parallel System, Distributed System

Author
Jeongho Nam http://samchon.org

Definition at line 49 of file MediatorSystem.hpp.

Constructor & Destructor Documentation

samchon::templates::parallel::MediatorSystem::MediatorSystem ( external::base::ExternalSystemArrayBase *  systemArray)
inline

Construct from parent ParallelSystemArrayMediator object.

Parameters
systemArrayThe parent ParallelSystemArrayMediator object.

Definition at line 70 of file MediatorSystem.hpp.

References start(), and ~MediatorSystem().

Here is the call graph for this function:

virtual samchon::templates::parallel::MediatorSystem::~MediatorSystem ( )
virtualdefault

Default Destructor.

Referenced by MediatorSystem().

Here is the caller graph for this function:

Member Function Documentation

virtual void samchon::templates::parallel::MediatorSystem::start ( )
pure virtual

Start interaction.

The start() is an abstract method starting interaction with the master system. If the master is a server, then connects to the master. Otherwise, the master is client, then this MediatorSystem object wil open a server accepting the master.

Implemented in samchon::templates::parallel::MediatorClient, samchon::templates::parallel::MediatorWebClient, and samchon::templates::parallel::MediatorServer.

Referenced by MediatorSystem().

Here is the caller graph for this function:

template<class SystemArray >
auto samchon::templates::parallel::MediatorSystem::getSystemArray ( ) const -> SystemArray*
inline

Get parent ParallelSystemArrayMediator object.

Definition at line 97 of file MediatorSystem.hpp.

References samchon::HashMap< Key, T, Hash, Pred, Alloc >::get(), and samchon::HashMap< Key, T, Hash, Pred, Alloc >::has().

Here is the call graph for this function:


The documentation for this class was generated from the following file: