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

#include <client_server.h>

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

Public Member Functions

virtual T read (DistributedId id, int location)=0
 
virtual void releaseRead (DistributedId id, int location)=0
 
virtual T acquire (DistributedId id, int location)=0
 
virtual void releaseAcquire (DistributedId id, const T &updated_data, int location)=0
 
virtual void lock (DistributedId id, int location)=0
 
virtual void unlock (DistributedId id, int location)=0
 
virtual void lockShared (DistributedId id, int location)=0
 
virtual void unlockShared (DistributedId id, int location)=0
 

Detailed Description

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

MutexClient API.

The MutexClient is used to transmit requests from an HardSyncMutex instance (associated to a DISTANT node) to distant processes.

All request transmission functions blocks until the corresponding response is received from the corresponding location.

General request transmission architecture

Member Function Documentation

◆ read()

template<typename T >
virtual T fpmas::synchro::hard::api::MutexClient< T >::read ( DistributedId  id,
int  location 
)
pure virtual

Transmits a READ request of node id to its location.

Parameters
idof the node to read
locationrank of the process that own node id
Returns
read data

Implemented in fpmas::synchro::hard::MutexClient< T >.

◆ releaseRead()

template<typename T >
virtual void fpmas::synchro::hard::api::MutexClient< T >::releaseRead ( DistributedId  id,
int  location 
)
pure virtual

Transmits a RELEASE_READ request of node id to its location.

Parameters
idof the read node
locationrank of the process that own node id

Implemented in fpmas::synchro::hard::MutexClient< T >.

◆ acquire()

template<typename T >
virtual T fpmas::synchro::hard::api::MutexClient< T >::acquire ( DistributedId  id,
int  location 
)
pure virtual

Transmits an ACQUIRE request of node id to its location.

Parameters
idof the node to acquire
locationrank of the process that own node id
Returns
acquired data

Implemented in fpmas::synchro::hard::MutexClient< T >.

◆ releaseAcquire()

template<typename T >
virtual void fpmas::synchro::hard::api::MutexClient< T >::releaseAcquire ( DistributedId  id,
const T &  updated_data,
int  location 
)
pure virtual

Transmits a RELEASE_ACQUIRE request of node id to its location.

The provided updated_data is serialized and transmitted to commit write operation to the owner process.

Parameters
idof the acquired node
updated_datareference to the locally updated data
locationrank of the process that own node id

Implemented in fpmas::synchro::hard::MutexClient< T >.

◆ lock()

template<typename T >
virtual void fpmas::synchro::hard::api::MutexClient< T >::lock ( DistributedId  id,
int  location 
)
pure virtual

Transmits a LOCK request of node id to its location.

Parameters
idof the node to lock
locationrank of the process that own node id

Implemented in fpmas::synchro::hard::MutexClient< T >.

◆ unlock()

template<typename T >
virtual void fpmas::synchro::hard::api::MutexClient< T >::unlock ( DistributedId  id,
int  location 
)
pure virtual

Transmits an UNLOCK request of node id to its location.

Parameters
idof the locked node
locationrank of the process that own node id

Implemented in fpmas::synchro::hard::MutexClient< T >.

◆ lockShared()

template<typename T >
virtual void fpmas::synchro::hard::api::MutexClient< T >::lockShared ( DistributedId  id,
int  location 
)
pure virtual

Transmits a LOCK_SHARED request of node id to its location.

Parameters
idof the node to share lock
locationrank of the process that own node id

Implemented in fpmas::synchro::hard::MutexClient< T >.

◆ unlockShared()

template<typename T >
virtual void fpmas::synchro::hard::api::MutexClient< T >::unlockShared ( DistributedId  id,
int  location 
)
pure virtual

Transmits an UNLOCK_SHARED request of node id to its location.

Parameters
idof the share locked node
locationrank of the process that own node id

Implemented in fpmas::synchro::hard::MutexClient< T >.


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