|
xrpld
|
An entry in the routing table. More...


Public Member Functions | |
| Entry ()=default | |
| void | addPeer (PeerShortID peer) |
| HashRouterFlags | getFlags () const |
| void | setFlags (HashRouterFlags flagsToSet) |
| void | clearFlags (HashRouterFlags flags) |
| Clear the given flags, leaving every other flag as it is. | |
| std::set< PeerShortID > | releasePeerSet () |
| Return set of peers we've relayed to and reset tracking. | |
| std::optional< Stopwatch::time_point > | relayed () const |
| Return seated relay time point if the message has been relayed. | |
| bool | shouldRelay (Stopwatch::time_point const &now, std::chrono::seconds relayTime) |
| Determines if this item should be relayed. | |
| bool | shouldProcess (Stopwatch::time_point now, std::chrono::seconds interval) |
Public Attributes | |
| friend | Object |
Static Private Member Functions | |
| static auto & | getCounter () noexcept |
Private Attributes | |
| HashRouterFlags | flags_ = HashRouterFlags::UNDEFINED |
| std::set< PeerShortID > | peers_ |
| std::optional< Stopwatch::time_point > | relayed_ |
| std::optional< Stopwatch::time_point > | processed_ |
An entry in the routing table.
Definition at line 134 of file HashRouter.h.
|
default |
| void xrpl::HashRouter::Entry::addPeer | ( | PeerShortID | peer | ) |
Definition at line 140 of file HashRouter.h.
|
nodiscard |
Definition at line 147 of file HashRouter.h.
| void xrpl::HashRouter::Entry::setFlags | ( | HashRouterFlags | flagsToSet | ) |
Definition at line 153 of file HashRouter.h.
| void xrpl::HashRouter::Entry::clearFlags | ( | HashRouterFlags | flags | ) |
Clear the given flags, leaving every other flag as it is.
| flags | The flags to clear. |
Definition at line 164 of file HashRouter.h.
| std::set< PeerShortID > xrpl::HashRouter::Entry::releasePeerSet | ( | ) |
Return set of peers we've relayed to and reset tracking.
Definition at line 173 of file HashRouter.h.
|
nodiscard |
Return seated relay time point if the message has been relayed.
Definition at line 182 of file HashRouter.h.
| bool xrpl::HashRouter::Entry::shouldRelay | ( | Stopwatch::time_point const & | now, |
| std::chrono::seconds | relayTime ) |
Determines if this item should be relayed.
Checks whether the item has been recently relayed. If it has, return false. If it has not, update the last relay timestamp and return true.
Definition at line 195 of file HashRouter.h.
| bool xrpl::HashRouter::Entry::shouldProcess | ( | Stopwatch::time_point | now, |
| std::chrono::seconds | interval ) |
Definition at line 204 of file HashRouter.h.
|
staticprivatenoexceptinherited |
Definition at line 113 of file CountedObject.h.
|
private |
Definition at line 213 of file HashRouter.h.
|
private |
Definition at line 214 of file HashRouter.h.
|
private |
Definition at line 217 of file HashRouter.h.
|
private |
Definition at line 218 of file HashRouter.h.
|
inherited |
Definition at line 138 of file CountedObject.h.