Public Member Functions | List of all members
rapidsmpf::bootstrap::detail::Backend Class Referenceabstract

Abstract interface for bootstrap coordination backends. More...

#include <backend.hpp>

Inheritance diagram for rapidsmpf::bootstrap::detail::Backend:
rapidsmpf::bootstrap::detail::FileBackend

Public Member Functions

virtual void put (std::string const &key, std::string const &value)=0
 Store a key-value pair (rank 0 only). More...
 
virtual std::string get (std::string const &key, Duration timeout)=0
 Retrieve a value, blocking until available or timeout occurs. More...
 
virtual void barrier ()=0
 Perform a barrier synchronization. More...
 
virtual void sync ()=0
 Ensure all previous put() operations are globally visible.
 
 Backend (Backend const &)=delete
 
Backendoperator= (Backend const &)=delete
 
 Backend (Backend &&)=delete
 
Backendoperator= (Backend &&)=delete
 

Detailed Description

Abstract interface for bootstrap coordination backends.

This interface defines the common operations that all backend implementations must support. Backend instances are stored in Context and reused across multiple operations to preserve state.

Definition at line 64 of file backend.hpp.

Member Function Documentation

◆ barrier()

virtual void rapidsmpf::bootstrap::detail::Backend::barrier ( )
pure virtual

Perform a barrier synchronization.

All ranks must call this before any rank proceeds.

Implemented in rapidsmpf::bootstrap::detail::FileBackend.

◆ get()

virtual std::string rapidsmpf::bootstrap::detail::Backend::get ( std::string const &  key,
Duration  timeout 
)
pure virtual

Retrieve a value, blocking until available or timeout occurs.

Any rank (including rank 0) can call this method to retrieve values that were published by rank 0 via put() and synchronized with sync().

Parameters
keyKey name.
timeoutTimeout duration.
Returns
Value associated with key.
Exceptions
std::runtime_errorif key not found within timeout.

Implemented in rapidsmpf::bootstrap::detail::FileBackend.

◆ put()

virtual void rapidsmpf::bootstrap::detail::Backend::put ( std::string const &  key,
std::string const &  value 
)
pure virtual

Store a key-value pair (rank 0 only).

Only rank 0 should call this method. The key-value pair is committed immediately and made visible to all ranks (including rank 0) after a collective sync(). Non-root ranks should only use get() to retrieve values published by rank 0.

Parameters
keyKey name.
valueValue to store.
Exceptions
std::runtime_errorif called by non-zero rank.

Implemented in rapidsmpf::bootstrap::detail::FileBackend.


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