Abstract interface for bootstrap coordination backends. More...
#include <backend.hpp>
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 | |
| Backend & | operator= (Backend const &)=delete |
| Backend (Backend &&)=delete | |
| Backend & | operator= (Backend &&)=delete |
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.
|
pure virtual |
Perform a barrier synchronization.
All ranks must call this before any rank proceeds.
Implemented in rapidsmpf::bootstrap::detail::FileBackend.
|
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().
| key | Key name. |
| timeout | Timeout duration. |
| std::runtime_error | if key not found within timeout. |
Implemented in rapidsmpf::bootstrap::detail::FileBackend.
|
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.
| key | Key name. |
| value | Value to store. |
| std::runtime_error | if called by non-zero rank. |
Implemented in rapidsmpf::bootstrap::detail::FileBackend.