rippled
|
Classes | |
struct | Comparator |
Public Member Functions | |
Cluster (beast::Journal j) | |
std::optional< std::string > | member (PublicKey const &node) const |
Determines whether a node belongs in the cluster. More... | |
std::size_t | size () const |
The number of nodes in the cluster list. More... | |
bool | update (PublicKey const &identity, std::string name, std::uint32_t loadFee=0, NetClock::time_point reportTime=NetClock::time_point{}) |
Store information about the state of a cluster node. More... | |
void | for_each (std::function< void(ClusterNode const &)> func) const |
Invokes the callback once for every cluster node. More... | |
bool | load (Section const &nodes) |
Load the list of cluster nodes. More... | |
Private Attributes | |
std::set< ClusterNode, Comparator > | nodes_ |
std::mutex | mutex_ |
beast::Journal | j_ |
ripple::Cluster::Cluster | ( | beast::Journal | j | ) |
Definition at line 34 of file Cluster.cpp.
std::optional< std::string > ripple::Cluster::member | ( | PublicKey const & | node | ) | const |
Determines whether a node belongs in the cluster.
Definition at line 39 of file Cluster.cpp.
std::size_t ripple::Cluster::size | ( | ) | const |
The number of nodes in the cluster list.
Definition at line 50 of file Cluster.cpp.
bool ripple::Cluster::update | ( | PublicKey const & | identity, |
std::string | name, | ||
std::uint32_t | loadFee = 0 , |
||
NetClock::time_point | reportTime = NetClock::time_point{} |
||
) |
Store information about the state of a cluster node.
identity | The node's public identity |
name | The node's name (may be empty) |
Definition at line 58 of file Cluster.cpp.
void ripple::Cluster::for_each | ( | std::function< void(ClusterNode const &)> | func | ) | const |
Invokes the callback once for every cluster node.
update
from within the callback. Definition at line 84 of file Cluster.cpp.
bool ripple::Cluster::load | ( | Section const & | nodes | ) |
Load the list of cluster nodes.
The section contains entries consisting of a base58 encoded node public key, optionally followed by a comment.
Definition at line 92 of file Cluster.cpp.
|
private |
|
mutableprivate |
|
mutableprivate |