fpmas 1.6
Public Types | Public Member Functions | List of all members
fpmas::synchro::hard::hard_link::LinkServer< T > Class Template Reference

#include <hard_sync_linker.h>

Inheritance diagram for fpmas::synchro::hard::hard_link::LinkServer< T >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::synchro::hard::hard_link::LinkServer< T >:
Collaboration graph
[legend]

Public Types

typedef fpmas::api::graph::DistributedEdge< T > EdgeApi
 
typedef fpmas::api::communication::TypedMpi< graph::EdgePtrWrapper< T > > EdgeMpi
 
typedef fpmas::api::communication::TypedMpi< DistributedIdIdMpi
 

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
 

Detailed Description

template<typename T>
class fpmas::synchro::hard::hard_link::LinkServer< T >

api::LinkServer implementation.

Member Typedef Documentation

◆ EdgeApi

DistributedEdge API.

◆ EdgeMpi

TypedMpi used to transmit Edges with MPI.

◆ IdMpi

TypedMpi used to transmit DistributedIds with MPI.

Constructor & Destructor Documentation

◆ LinkServer()

template<typename T >
fpmas::synchro::hard::hard_link::LinkServer< T >::LinkServer ( fpmas::api::communication::MpiCommunicator comm,
fpmas::api::graph::DistributedGraph< T > &  graph,
IdMpi id_mpi,
EdgeMpi edge_mpi 
)
inline

LinkServer constructor.

Parameters
commMPI communicator
graphassociated api::graph::DistributedGraph
id_mpiTyped MPI used to transmit DistributedId
edge_mpiTyped MPI used to transmit edges

Member Function Documentation

◆ getEpoch()

template<typename T >
Epoch fpmas::synchro::hard::hard_link::LinkServer< T >::getEpoch ( ) const
inlineoverridevirtual

Gets the current Epoch of the server.

Returns
current epoch

Implements fpmas::synchro::hard::api::Server.

◆ setEpoch()

template<typename T >
void fpmas::synchro::hard::hard_link::LinkServer< T >::setEpoch ( api::Epoch  epoch)
inlineoverridevirtual

Sets the current Epoch of the server.

Parameters
epochcurrent Epoch

Implements fpmas::synchro::hard::api::Server.

◆ handleIncomingRequests()

template<typename T >
void fpmas::synchro::hard::hard_link::LinkServer< T >::handleIncomingRequests ( )
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.

◆ lockUnlink()

template<typename T >
void fpmas::synchro::hard::hard_link::LinkServer< T >::lockUnlink ( DistributedId  edge_id)
inlineoverridevirtual

Locks the unlink operation on the edge corresponding to edge_id.

isLockedUnlink(edge_id) will return true until unlockUnlink(edge_id) is called.

Note
This is notably used by the LinkClient when an UNLINK operation is initialized from the local process. While the operation is performed, the unlink operation is locked so that UNLINK requests for the same edge coming from other processes will be ignored.
Parameters
edge_idid of the edge to unlink

Implements fpmas::synchro::hard::api::LinkServer.

◆ isLockedUnlink()

template<typename T >
bool fpmas::synchro::hard::hard_link::LinkServer< T >::isLockedUnlink ( DistributedId  edge_id)
inlineoverridevirtual

Returns true is an unlink operation has been locked for the edge corresponding to edge_id.

Parameters
edge_idid of the edge to unlink
Returns
true iff an unlink operation is locked

Implements fpmas::synchro::hard::api::LinkServer.

◆ unlockUnlink()

template<typename T >
void fpmas::synchro::hard::hard_link::LinkServer< T >::unlockUnlink ( DistributedId  edge_id)
inlineoverridevirtual

Releases an unlink operation on the edge corresponding to edge_id.

Parameters
edge_idid of the unlinked edge

Implements fpmas::synchro::hard::api::LinkServer.

◆ lockRemoveNode()

template<typename T >
void fpmas::synchro::hard::hard_link::LinkServer< T >::lockRemoveNode ( DistributedId  node_id)
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.

Parameters
node_idid of the local node to remove

Implements fpmas::synchro::hard::api::LinkServer.

◆ isLockedRemoveNode()

template<typename T >
bool fpmas::synchro::hard::hard_link::LinkServer< T >::isLockedRemoveNode ( DistributedId  node_id)
inlineoverridevirtual

Checks if a remove operation is locked on the local node represented by node_id.

Parameters
node_idlocal node id

Implements fpmas::synchro::hard::api::LinkServer.

◆ unlockRemoveNode()

template<typename T >
void fpmas::synchro::hard::hard_link::LinkServer< T >::unlockRemoveNode ( DistributedId  node_id)
inlineoverridevirtual

Unlocks a remove node operation previously applied on the local node represented by node_id.

Parameters
node_idlocal node id

Implements fpmas::synchro::hard::api::LinkServer.


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