Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
cluster::ClusterCommunicationService Class Reference

Service to post and read messages to/from the cluster. It uses a backend to communicate with the cluster. More...

#include <ClusterCommunicationService.hpp>

Inheritance diagram for cluster::ClusterCommunicationService:
Collaboration diagram for cluster::ClusterCommunicationService:

Public Member Functions

 ClusterCommunicationService (std::shared_ptr< data::BackendInterface > backend, std::unique_ptr< etl::WriterStateInterface > writerState, 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.
 ClusterCommunicationService (ClusterCommunicationService &&)=delete
 ClusterCommunicationService (ClusterCommunicationService const &)=delete
ClusterCommunicationServiceoperator= (ClusterCommunicationService &&)=delete
ClusterCommunicationServiceoperator= (ClusterCommunicationService const &)=delete
void run ()
 Start the service.
void stop ()
 Stop the service.

Static Public Attributes

static constexpr std::chrono::milliseconds kDEFAULT_READ_INTERVAL {1000}
static constexpr std::chrono::milliseconds kDEFAULT_WRITE_INTERVAL {1000}

Detailed Description

Service to post and read messages to/from the cluster. It uses a backend to communicate with the cluster.

Constructor & Destructor Documentation

◆ ClusterCommunicationService()

cluster::ClusterCommunicationService::ClusterCommunicationService ( std::shared_ptr< data::BackendInterface > backend,
std::unique_ptr< etl::WriterStateInterface > writerState,
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.

Parameters
backendThe backend to use for communication.
writerStateThe state showing whether clio is writing to the database.
readIntervalThe interval to read messages from the cluster.
writeIntervalThe interval to write messages to the cluster.

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