![]() |
fpmas 1.6
|
#include <hard_sync_linker.h>
Public Types | |
typedef fpmas::api::graph::DistributedEdge< T > | EdgeApi |
typedef fpmas::api::communication::TypedMpi< graph::EdgePtrWrapper< T > > | EdgeMpi |
typedef fpmas::api::communication::TypedMpi< DistributedId > | IdMpi |
Public Member Functions | |
LinkServer (fpmas::api::communication::MpiCommunicator &comm, fpmas::api::graph::DistributedGraph< T > &graph, IdMpi &id_mpi, EdgeMpi &edge_mpi) | |
Epoch | getEpoch () const override |
void | setEpoch (api::Epoch epoch) override |
void | handleIncomingRequests () override |
void | lockUnlink (DistributedId edge_id) override |
bool | isLockedUnlink (DistributedId edge_id) override |
void | unlockUnlink (DistributedId edge_id) override |
void | lockRemoveNode (DistributedId node_id) override |
bool | isLockedRemoveNode (DistributedId node_id) override |
void | unlockRemoveNode (DistributedId node_id) override |
virtual void | lockUnlink (DistributedId edge_id)=0 |
virtual bool | isLockedUnlink (DistributedId edge_id)=0 |
virtual void | unlockUnlink (DistributedId edge_id)=0 |
virtual void | lockRemoveNode (DistributedId node_id)=0 |
virtual bool | isLockedRemoveNode (DistributedId node_id)=0 |
virtual void | unlockRemoveNode (DistributedId node_id)=0 |
virtual void | setEpoch (Epoch epoch)=0 |
virtual Epoch | getEpoch () const =0 |
virtual void | handleIncomingRequests ()=0 |
api::LinkServer implementation.
typedef fpmas::api::graph::DistributedEdge<T> fpmas::synchro::hard::hard_link::LinkServer< T >::EdgeApi |
DistributedEdge API.
typedef fpmas::api::communication::TypedMpi<graph::EdgePtrWrapper<T> > fpmas::synchro::hard::hard_link::LinkServer< T >::EdgeMpi |
TypedMpi used to transmit Edges with MPI.
typedef fpmas::api::communication::TypedMpi<DistributedId> fpmas::synchro::hard::hard_link::LinkServer< T >::IdMpi |
TypedMpi used to transmit DistributedIds with MPI.
|
inline |
LinkServer constructor.
comm | MPI communicator |
graph | associated api::graph::DistributedGraph |
id_mpi | Typed MPI used to transmit DistributedId |
edge_mpi | Typed MPI used to transmit edges |
|
inlineoverridevirtual |
Gets the current Epoch of the server.
Implements fpmas::synchro::hard::api::Server.
|
inlineoverridevirtual |
Sets the current Epoch of the server.
epoch | current Epoch |
Implements fpmas::synchro::hard::api::Server.
|
overridevirtual |
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.
Implements fpmas::synchro::hard::api::Server.
|
inlineoverridevirtual |
Locks the unlink operation on the edge corresponding to edge_id
.
isLockedUnlink(edge_id)
will return true until unlockUnlink(edge_id)
is called.
edge_id | id of the edge to unlink |
Implements fpmas::synchro::hard::api::LinkServer.
|
inlineoverridevirtual |
Returns true is an unlink operation has been locked for the edge corresponding to edge_id
.
edge_id | id of the edge to unlink |
Implements fpmas::synchro::hard::api::LinkServer.
|
inlineoverridevirtual |
Releases an unlink operation on the edge corresponding to edge_id
.
edge_id | id of the unlinked edge |
Implements fpmas::synchro::hard::api::LinkServer.
|
inlineoverridevirtual |
Locks a remove operation on a local node, represented by node_id
.
This should be called as soon as possible when the remove node operation is initialized. Incoming unlink or remove operations received while the local remove node operation is locked will then be handled consistently to avoid unexpected behaviors.
node_id | id of the local node to remove |
Implements fpmas::synchro::hard::api::LinkServer.
|
inlineoverridevirtual |
Checks if a remove operation is locked on the local node represented by node_id
.
node_id | local node id |
Implements fpmas::synchro::hard::api::LinkServer.
|
inlineoverridevirtual |
Unlocks a remove node operation previously applied on the local node represented by node_id
.
node_id | local node id |
Implements fpmas::synchro::hard::api::LinkServer.