fpmas 1.6
Public Member Functions | List of all members
fpmas::synchro::hard::api::LinkClient< T > Class Template Referenceabstract

#include <client_server.h>

Inheritance diagram for fpmas::synchro::hard::api::LinkClient< T >:
Inheritance graph
[legend]

Public Member Functions

virtual void link (const fpmas::api::graph::DistributedEdge< T > *edge)=0
 
virtual void unlink (const fpmas::api::graph::DistributedEdge< T > *edge)=0
 
virtual void removeNode (const fpmas::api::graph::DistributedNode< T > *node)=0
 

Detailed Description

template<typename T>
class fpmas::synchro::hard::api::LinkClient< T >

LinkClient API.

The LinkClient is used to transmit link, unlink and node removal requests from the local process to distant processes.

Member Function Documentation

◆ link()

template<typename T >
virtual void fpmas::synchro::hard::api::LinkClient< T >::link ( const fpmas::api::graph::DistributedEdge< T > *  edge)
pure virtual

Transmits a link request for the specified edge.

The provided edge is assumed to be DISTANT, behavior is undefined otherwise.

The request is then transmitted to two other processes if source and target nodes are DISTANT and located on different processes, or to one process if they are located on the same process.

In any case, it is guaranteed that the edge is properly linked on any process involved upon return.

Notice that the api::graph::DistributedGraph implementation ensures that source and target nodes are share locked when this method is called.

Parameters
edgeedge to link

Implemented in fpmas::synchro::hard::hard_link::LinkClient< T >.

◆ unlink()

template<typename T >
virtual void fpmas::synchro::hard::api::LinkClient< T >::unlink ( const fpmas::api::graph::DistributedEdge< T > *  edge)
pure virtual

Transmits an unlink request for the specified edge.

The provided edge is assumed to be DISTANT, behavior is undefined otherwise.

The request is then transmitted to two other processes if source and target nodes are DISTANT and located on different processes, or to one process if they are located on the same process.

In any case, it is guaranteed that the edge is properly unlinked on any process involved upon return.

Notice that the api::graph::DistributedGraph implementation ensures that source and target nodes are share locked when this method is called.

Parameters
edgeedge to unlink

Implemented in fpmas::synchro::hard::hard_link::LinkClient< T >.

◆ removeNode()

template<typename T >
virtual void fpmas::synchro::hard::api::LinkClient< T >::removeNode ( const fpmas::api::graph::DistributedNode< T > *  node)
pure virtual

Transmits a remove node request for the specified node.

The provided edge is assumed to be DISTANT, behavior is undefined otherwise.

The request is transmitted to the process which own the node. It is then the role of the owner to globally unlink the node from the graph.

Upon return, it is guaranteed that the node is globally unlinked from the graph.

However, the node might be erased only when fpmas::api::graph::DistributedGraph::synchronize() is called. The reason for that is that in HardSyncMode, even if the node is unlinked by this method, mutex requests for this node that were send before the node was unlinked might be received after it was unlinked, until the termination algorithm is applied. Because we need to handle those requests, the node can't be erased until the termination algorithm is applied.

However, after this method has returned, it is guaranteed that no process can perform mutex requests to this node since it's globally unlinked from the graph.

Parameters
nodeDISTANT node to remove

Implemented in fpmas::synchro::hard::hard_link::LinkClient< T >.


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