|
Clio
develop
The XRP Ledger API server.
|
Service to post and read messages to/from the cluster. It uses a backend to communicate with the cluster. More...
#include <ClusterCommunicationService.hpp>


Public Member Functions | |
| ClusterCommunicationService (std::shared_ptr< data::BackendInterface > backend, std::chrono::steady_clock::duration readInterval=kDEFAULT_READ_INTERVAL, std::chrono::steady_clock::duration writeInterval=kDEFAULT_WRITE_INTERVAL) | |
| Construct a new Cluster Communication Service object. | |
| void | run () |
| Start the service. | |
| void | stop () |
| Stop the service. | |
| ClusterCommunicationService (ClusterCommunicationService &&)=delete | |
| ClusterCommunicationService (ClusterCommunicationService const &)=delete | |
| ClusterCommunicationService & | operator= (ClusterCommunicationService &&)=delete |
| ClusterCommunicationService & | operator= (ClusterCommunicationService const &)=delete |
| std::shared_ptr< boost::uuids::uuid > | selfUuid () const |
| Get the UUID of the current node. | |
| ClioNode | selfData () const override |
| Get the data of the current node. | |
| std::expected< std::vector< ClioNode >, std::string > | clusterData () const override |
| Get the data of all nodes in the cluster (including self). | |
Static Public Attributes | |
| static constexpr std::chrono::milliseconds | kDEFAULT_READ_INTERVAL {2100} |
| static constexpr std::chrono::milliseconds | kDEFAULT_WRITE_INTERVAL {1200} |
Service to post and read messages to/from the cluster. It uses a backend to communicate with the cluster.
| cluster::ClusterCommunicationService::ClusterCommunicationService | ( | std::shared_ptr< data::BackendInterface > | backend, |
| std::chrono::steady_clock::duration | readInterval = kDEFAULT_READ_INTERVAL, | ||
| std::chrono::steady_clock::duration | writeInterval = kDEFAULT_WRITE_INTERVAL ) |
Construct a new Cluster Communication Service object.
| backend | The backend to use for communication. |
| readInterval | The interval to read messages from the cluster. |
| writeInterval | The interval to write messages to the cluster. |
|
overridevirtual |
Get the data of all nodes in the cluster (including self).
Implements cluster::ClusterCommunicationServiceInterface.
|
overridevirtual |
Get the data of the current node.
Implements cluster::ClusterCommunicationServiceInterface.
| std::shared_ptr< boost::uuids::uuid > cluster::ClusterCommunicationService::selfUuid | ( | ) | const |
Get the UUID of the current node.