![]() |
fpmas 1.6
|
#include <client_server.h>
Public Member Functions | |
virtual void | setEpoch (Epoch epoch)=0 |
virtual Epoch | getEpoch () const =0 |
virtual void | handleIncomingRequests ()=0 |
Generic server API.
This interface is notably used by the generic TerminationAlgorithm to keep handling requests of any server until termination is detected.
Since termination is determined by "step", an odd or even Epoch is used to describe the current state of the server, so that messages sent in an odd period can't be received in an even period and vice versa.
the handleIncomingRequests() method is also extensively used to prevent deadlock situations.
|
pure virtual |
Sets the current Epoch of the server.
epoch | current Epoch |
Implemented in fpmas::synchro::hard::MutexServer< T >, fpmas::synchro::hard::hard_link::LinkServer< T >, fpmas::synchro::hard::VoidServer, and fpmas::synchro::hard::ServerPackBase.
|
pure virtual |
Gets the current Epoch of the server.
Implemented in fpmas::synchro::hard::hard_link::LinkServer< T >, fpmas::synchro::hard::MutexServer< T >, fpmas::synchro::hard::VoidServer, and fpmas::synchro::hard::ServerPackBase.
|
pure virtual |
Performs the full reception cycle associated to this server.
If at least one request supposed to be handled by this server is pending, the server must handle at least one of those request to ensure progress and avoid deadlock situations.
Implemented in fpmas::synchro::hard::hard_link::LinkServer< T >, fpmas::synchro::hard::MutexServer< T >, fpmas::synchro::hard::VoidServer, and fpmas::synchro::hard::ServerPackBase.