Files
rippled/classripple_1_1reduce__relay_1_1Slot.html
2025-11-04 00:36:48 -08:00

1034 lines
62 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>rippled: ripple::reduce_relay::Slot&lt; clock_type &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">rippled
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceripple.html">ripple</a></li><li class="navelem"><a class="el" href="namespaceripple_1_1reduce__relay.html">reduce_relay</a></li><li class="navelem"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">Slot</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pri-types">Private Types</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classripple_1_1reduce__relay_1_1Slot-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">ripple::reduce_relay::Slot&lt; clock_type &gt; Class Template Reference<span class="mlabels"><span class="mlabel">final</span></span></div></div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html" title="Slot is associated with a specific validator via validator&#39;s public key.">Slot</a> is associated with a specific validator via validator's public key.
<a href="classripple_1_1reduce__relay_1_1Slot.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="overlay_2Slot_8h_source.html">Slot.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for ripple::reduce_relay::Slot&lt; clock_type &gt;:</div>
<div class="dyncontent">
<div class="center"><img src="classripple_1_1reduce__relay_1_1Slot__coll__graph.png" border="0" usemap="#aripple_1_1reduce__relay_1_1Slot_3_01clock__type_01_4_coll__map" alt="Collaboration graph"/></div>
<map name="aripple_1_1reduce__relay_1_1Slot_3_01clock__type_01_4_coll__map" id="aripple_1_1reduce__relay_1_1Slot_3_01clock__type_01_4_coll__map">
<area shape="rect" title="Slot is associated with a specific validator via validator&#39;s public key." alt="" coords="849,141,1004,181"/>
<area shape="rect" target="_parent" href="http://en.cppreference.com/w/cpp/container/unordered_map.html" title=" " alt="" coords="451,70,673,125"/>
<area shape="poly" title=" " alt="" coords="688,115,826,139,849,143,848,148,825,144,687,120"/>
<area shape="rect" target="_parent" href="http://en.cppreference.com/w/cpp/types/integer.html" title=" " alt="" coords="209,26,311,51"/>
<area shape="poly" title=" " alt="" coords="325,48,451,73,450,78,324,54"/>
<area shape="rect" target="_parent" href="http://en.cppreference.com/w/cpp/container/unordered_set.html" title=" " alt="" coords="491,5,633,45"/>
<area shape="poly" title=" " alt="" coords="325,33,490,26,490,31,325,38"/>
<area shape="rect" href="structripple_1_1reduce__relay_1_1Slot_1_1PeerInfo.html" title="Data maintained for each peer." alt="" coords="183,89,337,143"/>
<area shape="poly" title=" " alt="" coords="351,115,427,112,450,110,451,115,427,117,351,120"/>
<area shape="rect" target="_parent" href="http://en.cppreference.com/w/cpp/types/size_t.html" title=" " alt="" coords="5,103,93,129"/>
<area shape="poly" title=" " alt="" coords="108,113,182,113,182,119,108,119"/>
<area shape="poly" title=" " alt="" coords="647,41,735,65,826,99,864,118,898,139,895,143,862,123,824,104,733,70,646,46"/>
<area shape="rect" target="_parent" href="http://en.cppreference.com/w/cpp/types/integer.html" title=" " alt="" coords="511,149,613,174"/>
<area shape="poly" title=" " alt="" coords="627,159,849,159,849,164,627,164"/>
<area shape="rect" href="classripple_1_1reduce__relay_1_1SquelchHandler.html" title="Abstract class." alt="" coords="487,199,637,239"/>
<area shape="poly" title=" " alt="" coords="650,205,825,179,849,174,849,180,826,184,651,210"/>
<area shape="rect" href="classbeast_1_1Journal.html" title="A generic endpoint for log messages." alt="" coords="507,263,617,289"/>
<area shape="poly" title=" " alt="" coords="630,266,724,249,775,236,824,219,863,200,896,179,899,184,865,205,826,224,776,241,725,254,631,271"/>
<area shape="rect" href="classbeast_1_1Journal_1_1Sink.html" title="Abstraction for the underlying message destination." alt="" coords="187,263,333,289"/>
<area shape="poly" title=" " alt="" coords="347,273,507,273,507,279,347,279"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structripple_1_1reduce__relay_1_1Slot_1_1PeerInfo.html">PeerInfo</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Data maintained for each peer. <a href="structripple_1_1reduce__relay_1_1Slot_1_1PeerInfo.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-types" name="pri-types"></a>
Private Types</h2></td></tr>
<tr class="memitem:a383178fe8cb95a5ad5f2c44f5a0feb53" id="r_a383178fe8cb95a5ad5f2c44f5a0feb53"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a383178fe8cb95a5ad5f2c44f5a0feb53">id_t</a> = <a class="el" href="classripple_1_1Peer.html#a56cc3cdd9c73921f23cb43a2bfa696a1">Peer::id_t</a></td></tr>
<tr class="separator:a383178fe8cb95a5ad5f2c44f5a0feb53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4698f19f0d6d30f83785d2ae2ccdd0bf" id="r_a4698f19f0d6d30f83785d2ae2ccdd0bf"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a4698f19f0d6d30f83785d2ae2ccdd0bf">time_point</a> = typename clock_type::time_point</td></tr>
<tr class="separator:a4698f19f0d6d30f83785d2ae2ccdd0bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4333b1cc4fc1356ad05a5c09fdf8af8" id="r_ab4333b1cc4fc1356ad05a5c09fdf8af8"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#ab4333b1cc4fc1356ad05a5c09fdf8af8">ignored_squelch_callback</a> = <a class="elRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a>&lt; void()&gt;</td></tr>
<tr class="separator:ab4333b1cc4fc1356ad05a5c09fdf8af8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a18aa97a37c2bc4018d0c96c14d98fbcc" id="r_a18aa97a37c2bc4018d0c96c14d98fbcc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a18aa97a37c2bc4018d0c96c14d98fbcc">Slot</a> (<a class="el" href="classripple_1_1reduce__relay_1_1SquelchHandler.html">SquelchHandler</a> const &amp;handler, <a class="el" href="classbeast_1_1Journal.html">beast::Journal</a> journal, uint16_t maxSelectedPeers)</td></tr>
<tr class="memdesc:a18aa97a37c2bc4018d0c96c14d98fbcc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a18aa97a37c2bc4018d0c96c14d98fbcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73959f50e13d8633b21c884a165c8040" id="r_a73959f50e13d8633b21c884a165c8040"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a73959f50e13d8633b21c884a165c8040">update</a> (<a class="el" href="classripple_1_1PublicKey.html">PublicKey</a> const &amp;validator, <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a383178fe8cb95a5ad5f2c44f5a0feb53">id_t</a> id, protocol::MessageType type, <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#ab4333b1cc4fc1356ad05a5c09fdf8af8">ignored_squelch_callback</a> callback)</td></tr>
<tr class="memdesc:a73959f50e13d8633b21c884a165c8040"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update peer info. <br /></td></tr>
<tr class="separator:a73959f50e13d8633b21c884a165c8040"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3588d6a33bbd8c51f3b3e415f90f7da7" id="r_a3588d6a33bbd8c51f3b3e415f90f7da7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a3588d6a33bbd8c51f3b3e415f90f7da7">deletePeer</a> (<a class="el" href="classripple_1_1PublicKey.html">PublicKey</a> const &amp;validator, <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a383178fe8cb95a5ad5f2c44f5a0feb53">id_t</a> id, bool <a class="el" href="namespaceripple.html#aa761b49f905eb9fd8c8ae754a0eb7504">erase</a>)</td></tr>
<tr class="memdesc:a3588d6a33bbd8c51f3b3e415f90f7da7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handle peer deletion when a peer disconnects. <br /></td></tr>
<tr class="separator:a3588d6a33bbd8c51f3b3e415f90f7da7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5681ee6ce15ca24838bcee5ede4530ea" id="r_a5681ee6ce15ca24838bcee5ede4530ea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a4698f19f0d6d30f83785d2ae2ccdd0bf">time_point</a> const &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a5681ee6ce15ca24838bcee5ede4530ea">getLastSelected</a> () const</td></tr>
<tr class="memdesc:a5681ee6ce15ca24838bcee5ede4530ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the time of the last peer selection round. <br /></td></tr>
<tr class="separator:a5681ee6ce15ca24838bcee5ede4530ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a961fd3be733e9c3ad55839d49d8f9a9d" id="r_a961fd3be733e9c3ad55839d49d8f9a9d"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a961fd3be733e9c3ad55839d49d8f9a9d">inState</a> (<a class="el" href="namespaceripple_1_1reduce__relay.html#ac8510a72575fb51be1db4944073f8b22">PeerState</a> state) const</td></tr>
<tr class="memdesc:a961fd3be733e9c3ad55839d49d8f9a9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return number of peers in state. <br /></td></tr>
<tr class="separator:a961fd3be733e9c3ad55839d49d8f9a9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fe96bbfd8750507a638e49e22afde00" id="r_a3fe96bbfd8750507a638e49e22afde00"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a3fe96bbfd8750507a638e49e22afde00">notInState</a> (<a class="el" href="namespaceripple_1_1reduce__relay.html#ac8510a72575fb51be1db4944073f8b22">PeerState</a> state) const</td></tr>
<tr class="memdesc:a3fe96bbfd8750507a638e49e22afde00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return number of peers not in state. <br /></td></tr>
<tr class="separator:a3fe96bbfd8750507a638e49e22afde00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87fd2669496a3edacbca79e40c7e58f8" id="r_a87fd2669496a3edacbca79e40c7e58f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceripple_1_1reduce__relay.html#a9f15d21d6c73738cdfad6e99d22a001e">SlotState</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a87fd2669496a3edacbca79e40c7e58f8">getState</a> () const</td></tr>
<tr class="memdesc:a87fd2669496a3edacbca79e40c7e58f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html" title="Slot is associated with a specific validator via validator&#39;s public key.">Slot</a>'s state. <br /></td></tr>
<tr class="separator:a87fd2669496a3edacbca79e40c7e58f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76ff97ba5a14968dcd983af5b07f1f33" id="r_a76ff97ba5a14968dcd983af5b07f1f33"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set</a>&lt; <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a383178fe8cb95a5ad5f2c44f5a0feb53">id_t</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a76ff97ba5a14968dcd983af5b07f1f33">getSelected</a> () const</td></tr>
<tr class="memdesc:a76ff97ba5a14968dcd983af5b07f1f33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return selected peers. <br /></td></tr>
<tr class="separator:a76ff97ba5a14968dcd983af5b07f1f33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05d53067b0c45234dee4d77b94edb0a0" id="r_a05d53067b0c45234dee4d77b94edb0a0"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/container/unordered_map.html">std::unordered_map</a>&lt; <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a383178fe8cb95a5ad5f2c44f5a0feb53">id_t</a>, <a class="elRef" href="http://en.cppreference.com/w/cpp/utility/tuple.html">std::tuple</a>&lt; <a class="el" href="namespaceripple_1_1reduce__relay.html#ac8510a72575fb51be1db4944073f8b22">PeerState</a>, uint16_t, uint32_t, uint32_t &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a05d53067b0c45234dee4d77b94edb0a0">getPeers</a> () const</td></tr>
<tr class="memdesc:a05d53067b0c45234dee4d77b94edb0a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get peers info. <br /></td></tr>
<tr class="separator:a05d53067b0c45234dee4d77b94edb0a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa45e32fbe0cd5d2dcc726146b9295328" id="r_aa45e32fbe0cd5d2dcc726146b9295328"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#aa45e32fbe0cd5d2dcc726146b9295328">deleteIdlePeer</a> (<a class="el" href="classripple_1_1PublicKey.html">PublicKey</a> const &amp;validator)</td></tr>
<tr class="memdesc:aa45e32fbe0cd5d2dcc726146b9295328"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if peers stopped relaying messages. <br /></td></tr>
<tr class="separator:aa45e32fbe0cd5d2dcc726146b9295328"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc2ed9802972f7bbbdaf356e3a36d6da" id="r_acc2ed9802972f7bbbdaf356e3a36d6da"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#acc2ed9802972f7bbbdaf356e3a36d6da">getSquelchDuration</a> (<a class="elRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> npeers)</td></tr>
<tr class="memdesc:acc2ed9802972f7bbbdaf356e3a36d6da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get random squelch duration between MIN_UNSQUELCH_EXPIRE and min(max(MAX_UNSQUELCH_EXPIRE_DEFAULT, SQUELCH_PER_PEER * npeers),
MAX_UNSQUELCH_EXPIRE_PEERS) <br /></td></tr>
<tr class="separator:acc2ed9802972f7bbbdaf356e3a36d6da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc5a6619f14f869bac20d5f44bf1c825" id="r_afc5a6619f14f869bac20d5f44bf1c825"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#afc5a6619f14f869bac20d5f44bf1c825">resetCounts</a> ()</td></tr>
<tr class="memdesc:afc5a6619f14f869bac20d5f44bf1c825"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset counts of peers in Selected or Counting state. <br /></td></tr>
<tr class="separator:afc5a6619f14f869bac20d5f44bf1c825"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52bf534e6af227e1e76495d3d6d484a7" id="r_a52bf534e6af227e1e76495d3d6d484a7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a52bf534e6af227e1e76495d3d6d484a7">initCounting</a> ()</td></tr>
<tr class="memdesc:a52bf534e6af227e1e76495d3d6d484a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize slot to Counting state. <br /></td></tr>
<tr class="separator:a52bf534e6af227e1e76495d3d6d484a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:ad5915fa8b608fb30c3dc92a042cf8ad8" id="r_ad5915fa8b608fb30c3dc92a042cf8ad8"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/container/unordered_map.html">std::unordered_map</a>&lt; <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a383178fe8cb95a5ad5f2c44f5a0feb53">id_t</a>, <a class="el" href="structripple_1_1reduce__relay_1_1Slot_1_1PeerInfo.html">PeerInfo</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#ad5915fa8b608fb30c3dc92a042cf8ad8">peers_</a></td></tr>
<tr class="separator:ad5915fa8b608fb30c3dc92a042cf8ad8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbf3ac18ffc4cbab191704ad4817cefc" id="r_abbf3ac18ffc4cbab191704ad4817cefc"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/container/unordered_set.html">std::unordered_set</a>&lt; <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a383178fe8cb95a5ad5f2c44f5a0feb53">id_t</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#abbf3ac18ffc4cbab191704ad4817cefc">considered_</a></td></tr>
<tr class="separator:abbf3ac18ffc4cbab191704ad4817cefc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a399e8c88d6ef100832f7783b7ea20634" id="r_a399e8c88d6ef100832f7783b7ea20634"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a399e8c88d6ef100832f7783b7ea20634">reachedThreshold_</a></td></tr>
<tr class="separator:a399e8c88d6ef100832f7783b7ea20634"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ceaa51be6a1be8397cb908c3992ce28" id="r_a5ceaa51be6a1be8397cb908c3992ce28"><td class="memItemLeft" align="right" valign="top">clock_type::time_point&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a5ceaa51be6a1be8397cb908c3992ce28">lastSelected_</a></td></tr>
<tr class="separator:a5ceaa51be6a1be8397cb908c3992ce28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9ba20e98ad86d8e027fbe2c8c46f58c" id="r_af9ba20e98ad86d8e027fbe2c8c46f58c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceripple_1_1reduce__relay.html#a9f15d21d6c73738cdfad6e99d22a001e">SlotState</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#af9ba20e98ad86d8e027fbe2c8c46f58c">state_</a></td></tr>
<tr class="separator:af9ba20e98ad86d8e027fbe2c8c46f58c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a506656a3fb3806732252cc690c25bf2d" id="r_a506656a3fb3806732252cc690c25bf2d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classripple_1_1reduce__relay_1_1SquelchHandler.html">SquelchHandler</a> const &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a506656a3fb3806732252cc690c25bf2d">handler_</a></td></tr>
<tr class="separator:a506656a3fb3806732252cc690c25bf2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affd0e028ba910f8a694b0ae37f29051c" id="r_affd0e028ba910f8a694b0ae37f29051c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbeast_1_1Journal.html">beast::Journal</a> const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#affd0e028ba910f8a694b0ae37f29051c">journal_</a></td></tr>
<tr class="separator:affd0e028ba910f8a694b0ae37f29051c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a60bc207a03bb12b1278fda89adae99" id="r_a3a60bc207a03bb12b1278fda89adae99"><td class="memItemLeft" align="right" valign="top">uint16_t const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a3a60bc207a03bb12b1278fda89adae99">maxSelectedPeers_</a></td></tr>
<tr class="separator:a3a60bc207a03bb12b1278fda89adae99"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a388610512ec6b4ac10e70735797eee39" id="r_a388610512ec6b4ac10e70735797eee39"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a388610512ec6b4ac10e70735797eee39">Slots&lt; clock_type &gt;</a></td></tr>
<tr class="separator:a388610512ec6b4ac10e70735797eee39"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;typename clock_type&gt;<br />
class ripple::reduce_relay::Slot&lt; clock_type &gt;</div><p><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html" title="Slot is associated with a specific validator via validator&#39;s public key.">Slot</a> is associated with a specific validator via validator's public key. </p>
<p><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html" title="Slot is associated with a specific validator via validator&#39;s public key.">Slot</a> counts messages from a validator, selects peers to be the source of the messages, and communicates the peers to be squelched. <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html" title="Slot is associated with a specific validator via validator&#39;s public key.">Slot</a> can be in the following states: 1) Counting. This is the peer selection state when <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html" title="Slot is associated with a specific validator via validator&#39;s public key.">Slot</a> counts the messages and selects the peers; 2) Selected. <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html" title="Slot is associated with a specific validator via validator&#39;s public key.">Slot</a> doesn't count messages in Selected state. A message received from unsquelched, disconnected peer, or idling peer may transition <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html" title="Slot is associated with a specific validator via validator&#39;s public key.">Slot</a> to Counting state. </p>
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00086">86</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a383178fe8cb95a5ad5f2c44f5a0feb53" name="a383178fe8cb95a5ad5f2c44f5a0feb53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a383178fe8cb95a5ad5f2c44f5a0feb53">&#9670;&#160;</a></span>id_t</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::id_t = <a class="el" href="classripple_1_1Peer.html#a56cc3cdd9c73921f23cb43a2bfa696a1">Peer::id_t</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00090">90</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="a4698f19f0d6d30f83785d2ae2ccdd0bf" name="a4698f19f0d6d30f83785d2ae2ccdd0bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4698f19f0d6d30f83785d2ae2ccdd0bf">&#9670;&#160;</a></span>time_point</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::time_point = typename clock_type::time_point</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00091">91</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="ab4333b1cc4fc1356ad05a5c09fdf8af8" name="ab4333b1cc4fc1356ad05a5c09fdf8af8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4333b1cc4fc1356ad05a5c09fdf8af8">&#9670;&#160;</a></span>ignored_squelch_callback</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::ignored_squelch_callback = <a class="elRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a>&lt;void()&gt;</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00094">94</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a18aa97a37c2bc4018d0c96c14d98fbcc" name="a18aa97a37c2bc4018d0c96c14d98fbcc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a18aa97a37c2bc4018d0c96c14d98fbcc">&#9670;&#160;</a></span>Slot()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::Slot </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classripple_1_1reduce__relay_1_1SquelchHandler.html">SquelchHandler</a> const &amp;&#160;</td>
<td class="paramname"><em>handler</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classbeast_1_1Journal.html">beast::Journal</a>&#160;</td>
<td class="paramname"><em>journal</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>maxSelectedPeers</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">journal</td><td>Journal for logging </td></tr>
<tr><td class="paramname">handler</td><td>Squelch/Unsquelch implementation </td></tr>
<tr><td class="paramname">maxSelectedPeers</td><td>the maximum number of peers to be selected as validator message source </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00102">102</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a73959f50e13d8633b21c884a165c8040" name="a73959f50e13d8633b21c884a165c8040"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a73959f50e13d8633b21c884a165c8040">&#9670;&#160;</a></span>update()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::update </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classripple_1_1PublicKey.html">PublicKey</a> const &amp;&#160;</td>
<td class="paramname"><em>validator</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a383178fe8cb95a5ad5f2c44f5a0feb53">id_t</a>&#160;</td>
<td class="paramname"><em>id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">protocol::MessageType&#160;</td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#ab4333b1cc4fc1356ad05a5c09fdf8af8">ignored_squelch_callback</a>&#160;</td>
<td class="paramname"><em>callback</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Update peer info. </p>
<p>If the message is from a new peer or from a previously expired squelched peer then switch the peer's and slot's state to Counting. If time of last selection round is &gt; 2 * MAX_UNSQUELCH_EXPIRE_DEFAULT then switch the slot's state to Counting. If the number of messages for the peer is &gt; MIN_MESSAGE_THRESHOLD then add peer to considered peers pool. If the number of considered peers who reached MAX_MESSAGE_THRESHOLD is maxSelectedPeers_ then randomly select maxSelectedPeers_ from considered peers, and call squelch handler for each peer, which is not selected and not already in Squelched state. Set the state for those peers to Squelched and reset the count of all peers. Set slot's state to Selected. <a class="el" href="classripple_1_1Message.html">Message</a> count is not updated when the slot is in Selected state. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">validator</td><td>Public key of the source validator </td></tr>
<tr><td class="paramname">id</td><td><a class="el" href="classripple_1_1Peer.html" title="Represents a peer connection in the overlay.">Peer</a> id which received the message </td></tr>
<tr><td class="paramname">type</td><td><a class="el" href="classripple_1_1Message.html">Message</a> type (Validation and Propose Set only, others are ignored, future use) </td></tr>
<tr><td class="paramname">callback</td><td>A callback to report ignored squelches </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00268">268</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="a3588d6a33bbd8c51f3b3e415f90f7da7" name="a3588d6a33bbd8c51f3b3e415f90f7da7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3588d6a33bbd8c51f3b3e415f90f7da7">&#9670;&#160;</a></span>deletePeer()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::deletePeer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classripple_1_1PublicKey.html">PublicKey</a> const &amp;&#160;</td>
<td class="paramname"><em>validator</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a383178fe8cb95a5ad5f2c44f5a0feb53">id_t</a>&#160;</td>
<td class="paramname"><em>id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>erase</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Handle peer deletion when a peer disconnects. </p>
<p>If the peer is in Selected state then call unsquelch handler for every peer in squelched state and reset every peer's state to Counting. Switch <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html" title="Slot is associated with a specific validator via validator&#39;s public key.">Slot</a>'s state to Counting. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">validator</td><td>Public key of the source validator </td></tr>
<tr><td class="paramname">id</td><td>Deleted peer id </td></tr>
<tr><td class="paramname">erase</td><td>If true then erase the peer. The peer is not erased when the peer when is idled. The peer is deleted when it disconnects </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00425">425</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="a5681ee6ce15ca24838bcee5ede4530ea" name="a5681ee6ce15ca24838bcee5ede4530ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5681ee6ce15ca24838bcee5ede4530ea">&#9670;&#160;</a></span>getLastSelected()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a4698f19f0d6d30f83785d2ae2ccdd0bf">time_point</a> const &amp; <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::getLastSelected </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the time of the last peer selection round. </p>
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00156">156</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="a961fd3be733e9c3ad55839d49d8f9a9d" name="a961fd3be733e9c3ad55839d49d8f9a9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a961fd3be733e9c3ad55839d49d8f9a9d">&#9670;&#160;</a></span>inState()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::inState </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespaceripple_1_1reduce__relay.html#ac8510a72575fb51be1db4944073f8b22">PeerState</a>&#160;</td>
<td class="paramname"><em>state</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return number of peers in state. </p>
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00495">495</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="a3fe96bbfd8750507a638e49e22afde00" name="a3fe96bbfd8750507a638e49e22afde00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3fe96bbfd8750507a638e49e22afde00">&#9670;&#160;</a></span>notInState()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::notInState </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespaceripple_1_1reduce__relay.html#ac8510a72575fb51be1db4944073f8b22">PeerState</a>&#160;</td>
<td class="paramname"><em>state</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return number of peers not in state. </p>
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00504">504</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="a87fd2669496a3edacbca79e40c7e58f8" name="a87fd2669496a3edacbca79e40c7e58f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87fd2669496a3edacbca79e40c7e58f8">&#9670;&#160;</a></span>getState()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceripple_1_1reduce__relay.html#a9f15d21d6c73738cdfad6e99d22a001e">SlotState</a> <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::getState </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html" title="Slot is associated with a specific validator via validator&#39;s public key.">Slot</a>'s state. </p>
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00171">171</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="a76ff97ba5a14968dcd983af5b07f1f33" name="a76ff97ba5a14968dcd983af5b07f1f33"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76ff97ba5a14968dcd983af5b07f1f33">&#9670;&#160;</a></span>getSelected()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/container/set.html">std::set</a>&lt; typename <a class="el" href="classripple_1_1Peer.html#a56cc3cdd9c73921f23cb43a2bfa696a1">Peer::id_t</a> &gt; <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::getSelected </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return selected peers. </p>
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00513">513</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="a05d53067b0c45234dee4d77b94edb0a0" name="a05d53067b0c45234dee4d77b94edb0a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05d53067b0c45234dee4d77b94edb0a0">&#9670;&#160;</a></span>getPeers()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/container/unordered_map.html">std::unordered_map</a>&lt; typename <a class="el" href="classripple_1_1Peer.html#a56cc3cdd9c73921f23cb43a2bfa696a1">Peer::id_t</a>, <a class="elRef" href="http://en.cppreference.com/w/cpp/utility/tuple.html">std::tuple</a>&lt; <a class="el" href="namespaceripple_1_1reduce__relay.html#ac8510a72575fb51be1db4944073f8b22">PeerState</a>, uint16_t, uint32_t, uint32_t &gt; &gt; <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::getPeers </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get peers info. </p>
<p>Return map of peer's state, count, squelch expiration milsec, and last message time milsec. </p>
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00526">526</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="aa45e32fbe0cd5d2dcc726146b9295328" name="aa45e32fbe0cd5d2dcc726146b9295328"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa45e32fbe0cd5d2dcc726146b9295328">&#9670;&#160;</a></span>deleteIdlePeer()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::deleteIdlePeer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classripple_1_1PublicKey.html">PublicKey</a> const &amp;&#160;</td>
<td class="paramname"><em>validator</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if peers stopped relaying messages. </p>
<p>If a peer is selected peer then call unsquelch handler for all currently squelched peers and switch the slot to Counting state. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">validator</td><td>Public key of the source validator </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00245">245</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="acc2ed9802972f7bbbdaf356e3a36d6da" name="acc2ed9802972f7bbbdaf356e3a36d6da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc2ed9802972f7bbbdaf356e3a36d6da">&#9670;&#160;</a></span>getSquelchDuration()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a> <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::getSquelchDuration </td>
<td>(</td>
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a>&#160;</td>
<td class="paramname"><em>npeers</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get random squelch duration between MIN_UNSQUELCH_EXPIRE and min(max(MAX_UNSQUELCH_EXPIRE_DEFAULT, SQUELCH_PER_PEER * npeers),
MAX_UNSQUELCH_EXPIRE_PEERS) </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">npeers</td><td>number of peers that can be squelched in the <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html" title="Slot is associated with a specific validator via validator&#39;s public key.">Slot</a> </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00409">409</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="afc5a6619f14f869bac20d5f44bf1c825" name="afc5a6619f14f869bac20d5f44bf1c825"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc5a6619f14f869bac20d5f44bf1c825">&#9670;&#160;</a></span>resetCounts()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::resetCounts </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Reset counts of peers in Selected or Counting state. </p>
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00474">474</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="a52bf534e6af227e1e76495d3d6d484a7" name="a52bf534e6af227e1e76495d3d6d484a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52bf534e6af227e1e76495d3d6d484a7">&#9670;&#160;</a></span>initCounting()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::initCounting </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize slot to Counting state. </p>
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00485">485</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Friends And Related Symbol Documentation</h2>
<a id="a388610512ec6b4ac10e70735797eee39" name="a388610512ec6b4ac10e70735797eee39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a388610512ec6b4ac10e70735797eee39">&#9670;&#160;</a></span>Slots&lt; clock_type &gt;</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">friend class <a class="el" href="classripple_1_1reduce__relay_1_1Slots.html">Slots</a>&lt; clock_type &gt;</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00072">72</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="ad5915fa8b608fb30c3dc92a042cf8ad8" name="ad5915fa8b608fb30c3dc92a042cf8ad8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5915fa8b608fb30c3dc92a042cf8ad8">&#9670;&#160;</a></span>peers_</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/container/unordered_map.html">std::unordered_map</a>&lt;<a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a383178fe8cb95a5ad5f2c44f5a0feb53">id_t</a>, <a class="el" href="structripple_1_1reduce__relay_1_1Slot_1_1PeerInfo.html">PeerInfo</a>&gt; <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::peers_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00222">222</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="abbf3ac18ffc4cbab191704ad4817cefc" name="abbf3ac18ffc4cbab191704ad4817cefc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abbf3ac18ffc4cbab191704ad4817cefc">&#9670;&#160;</a></span>considered_</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/container/unordered_set.html">std::unordered_set</a>&lt;<a class="el" href="classripple_1_1reduce__relay_1_1Slot.html#a383178fe8cb95a5ad5f2c44f5a0feb53">id_t</a>&gt; <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::considered_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00226">226</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="a399e8c88d6ef100832f7783b7ea20634" name="a399e8c88d6ef100832f7783b7ea20634"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a399e8c88d6ef100832f7783b7ea20634">&#9670;&#160;</a></span>reachedThreshold_</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint16_t</a> <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::reachedThreshold_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00229">229</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="a5ceaa51be6a1be8397cb908c3992ce28" name="a5ceaa51be6a1be8397cb908c3992ce28"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ceaa51be6a1be8397cb908c3992ce28">&#9670;&#160;</a></span>lastSelected_</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">clock_type::time_point <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::lastSelected_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00232">232</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="af9ba20e98ad86d8e027fbe2c8c46f58c" name="af9ba20e98ad86d8e027fbe2c8c46f58c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9ba20e98ad86d8e027fbe2c8c46f58c">&#9670;&#160;</a></span>state_</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceripple_1_1reduce__relay.html#a9f15d21d6c73738cdfad6e99d22a001e">SlotState</a> <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::state_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00234">234</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="a506656a3fb3806732252cc690c25bf2d" name="a506656a3fb3806732252cc690c25bf2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a506656a3fb3806732252cc690c25bf2d">&#9670;&#160;</a></span>handler_</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classripple_1_1reduce__relay_1_1SquelchHandler.html">SquelchHandler</a> const&amp; <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::handler_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00235">235</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="affd0e028ba910f8a694b0ae37f29051c" name="affd0e028ba910f8a694b0ae37f29051c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#affd0e028ba910f8a694b0ae37f29051c">&#9670;&#160;</a></span>journal_</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classbeast_1_1Journal.html">beast::Journal</a> const <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::journal_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00236">236</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
<a id="a3a60bc207a03bb12b1278fda89adae99" name="a3a60bc207a03bb12b1278fda89adae99"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a60bc207a03bb12b1278fda89adae99">&#9670;&#160;</a></span>maxSelectedPeers_</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename clock_type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint16_t const <a class="el" href="classripple_1_1reduce__relay_1_1Slot.html">ripple::reduce_relay::Slot</a>&lt; clock_type &gt;::maxSelectedPeers_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="overlay_2Slot_8h_source.html#l00240">240</a> of file <a class="el" href="overlay_2Slot_8h_source.html">overlay/Slot.h</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>