mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 03:26:01 +00:00
233 lines
38 KiB
HTML
233 lines
38 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">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>rippled: FullBelowCache.h Source File</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 style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">rippled
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.17 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @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:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(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">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_df9c78dcf3f59a33b12284f95992a64b.html">ripple</a></li><li class="navelem"><a class="el" href="dir_380eda8174f5eb060d37b8b034a94866.html">shamap</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">FullBelowCache.h</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//------------------------------------------------------------------------------</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">/*</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> This file is part of rippled: https://github.com/ripple/rippled</span></div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> Copyright (c) 2012, 2013 Ripple Labs Inc.</span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> Permission to use, copy, modify, and/or distribute this software for any</span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> purpose with or without fee is hereby granted, provided that the above</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> copyright notice and this permission notice appear in all copies.</span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"></span> </div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES</span></div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN</span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF</span></div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">*/</span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">//==============================================================================</span></div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  </div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#ifndef RIPPLE_SHAMAP_FULLBELOWCACHE_H_INCLUDED</span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#define RIPPLE_SHAMAP_FULLBELOWCACHE_H_INCLUDED</span></div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  </div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <ripple/basics/KeyCache.h></span></div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <ripple/basics/base_uint.h></span></div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <ripple/beast/insight/Collector.h></span></div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/atomic.html">atomic</a>></span></div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <<a class="codeRef" href="http://en.cppreference.com/w/cpp/header/string.html">string</a>></span></div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  </div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">namespace </span><a class="code" href="namespaceripple.html">ripple</a> {</div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  </div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">namespace </span>detail {</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  </div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">template</span> <<span class="keyword">class</span> Key></div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html"> 37</a></span> <span class="keyword">class </span><a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html">BasicFullBelowCache</a></div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> {</div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a053001dc20690a3c54616fe8f3fea843"> 40</a></span>  <span class="keyword">using</span> <a class="code" href="classripple_1_1KeyCache.html">CacheType</a> = <a class="code" href="classripple_1_1KeyCache.html">KeyCache<Key></a>;</div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  </div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a6e0eeda7864e33e83a5a6a61e1b66c88ae10ce03f09b314faadeff8cff304c326"> 43</a></span>  <span class="keyword">enum</span> { <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a6e0eeda7864e33e83a5a6a61e1b66c88ae10ce03f09b314faadeff8cff304c326">defaultCacheTargetSize</a> = 0 };</div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  </div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#af834351ef2de493fa8077fad69f63608"> 45</a></span>  <span class="keyword">using</span> <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#af834351ef2de493fa8077fad69f63608">key_type</a> = Key;</div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#aae7b2e296d6e1572c20fad56bc9aba31"> 46</a></span>  <span class="keyword">using</span> <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#aae7b2e296d6e1572c20fad56bc9aba31">size_type</a> = <span class="keyword">typename</span> <a class="code" href="classripple_1_1KeyCache.html#a27ffdc83af477dfc719054907918a148">CacheType::size_type</a>;</div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a75bf1d68ac90ebc1163e8e6bd0568752"> 47</a></span>  <span class="keyword">using</span> <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a75bf1d68ac90ebc1163e8e6bd0568752">clock_type</a> = <span class="keyword">typename</span> <a class="code" href="classripple_1_1KeyCache.html#a08e89647e3c3229104230c925433920d">CacheType::clock_type</a>;</div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  </div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a6cdb5c5c5ec9f0e77685ae8413cbb4cc"> 56</a></span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a6cdb5c5c5ec9f0e77685ae8413cbb4cc">BasicFullBelowCache</a>(</div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>& name,</div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a75bf1d68ac90ebc1163e8e6bd0568752">clock_type</a>& <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a11d4cb29d2faa05a9f737e9a77c375dc">clock</a>,</div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">beast::insight::Collector::ptr</a> <span class="keyword">const</span>& collector =</div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <a class="code" href="classbeast_1_1insight_1_1NullCollector.html#a8821f08e6db108aacae400a738286da6">beast::insight::NullCollector::New</a>(),</div>
|
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> target_size = <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a6e0eeda7864e33e83a5a6a61e1b66c88ae10ce03f09b314faadeff8cff304c326">defaultCacheTargetSize</a>,</div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a> expiration = <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::minutes</a>{2})</div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  : <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a45cf80eb5c726d631eeebf77bfd3ae78">m_cache</a>(name, <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a11d4cb29d2faa05a9f737e9a77c375dc">clock</a>, collector, target_size, expiration), <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a02f7ec259bbd5a7e2a427403a312b69f">m_gen</a>(1)</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  {</div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  }</div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  </div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a75bf1d68ac90ebc1163e8e6bd0568752">clock_type</a>&</div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a11d4cb29d2faa05a9f737e9a77c375dc"> 69</a></span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a11d4cb29d2faa05a9f737e9a77c375dc">clock</a>()</div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  {</div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="keywordflow">return</span> <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a45cf80eb5c726d631eeebf77bfd3ae78">m_cache</a>.<a class="code" href="classripple_1_1KeyCache.html#a0cbb2397d4e536bf904871481ca03056">clock</a>();</div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  }</div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  </div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#aae7b2e296d6e1572c20fad56bc9aba31">size_type</a></div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a2d15ae999cbf512e349a9b9c9116359b"> 79</a></span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a2d15ae999cbf512e349a9b9c9116359b">size</a>()<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="keywordflow">return</span> <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a45cf80eb5c726d631eeebf77bfd3ae78">m_cache</a>.<a class="code" href="classripple_1_1KeyCache.html#ab9ecd66501ebdc5d92af5f6f86d178ca">size</a>();</div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  }</div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  </div>
|
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordtype">void</span></div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#abc3d54fc0e19eb02dfb80cb16b46a61c"> 89</a></span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#abc3d54fc0e19eb02dfb80cb16b46a61c">sweep</a>()</div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  {</div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a45cf80eb5c726d631eeebf77bfd3ae78">m_cache</a>.<a class="code" href="classripple_1_1KeyCache.html#a774eec36bd59b6a346ef7a613734d921">sweep</a>();</div>
|
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  }</div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  </div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keywordtype">bool</span></div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a5e207e81c6878a8d26e48c8fdaad5859"> 101</a></span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a5e207e81c6878a8d26e48c8fdaad5859">touch_if_exists</a>(<a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#af834351ef2de493fa8077fad69f63608">key_type</a> <span class="keyword">const</span>& key)</div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  {</div>
|
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keywordflow">return</span> <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a45cf80eb5c726d631eeebf77bfd3ae78">m_cache</a>.<a class="code" href="classripple_1_1KeyCache.html#ad93a1bca0da205d937a9b9781ffab7c9">touch_if_exists</a>(key);</div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  }</div>
|
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  </div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="keywordtype">void</span></div>
|
|
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a6344198691e605702d23eba86a3177b2"> 114</a></span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a6344198691e605702d23eba86a3177b2">insert</a>(<a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#af834351ef2de493fa8077fad69f63608">key_type</a> <span class="keyword">const</span>& key)</div>
|
|
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  {</div>
|
|
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a45cf80eb5c726d631eeebf77bfd3ae78">m_cache</a>.<a class="code" href="classripple_1_1KeyCache.html#a72fad1c7856e2c855e32de68eed56f82">insert</a>(key);</div>
|
|
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  }</div>
|
|
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  </div>
|
|
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a></div>
|
|
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a24dcba9ab4a873d9d002a903585fff45"> 121</a></span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a24dcba9ab4a873d9d002a903585fff45">getGeneration</a>(<span class="keywordtype">void</span>)<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="keywordflow">return</span> <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a02f7ec259bbd5a7e2a427403a312b69f">m_gen</a>;</div>
|
|
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  }</div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  </div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordtype">void</span></div>
|
|
<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#ab848d9b7735bd22c13ce05478c322aca"> 127</a></span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#ab848d9b7735bd22c13ce05478c322aca">clear</a>()</div>
|
|
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  {</div>
|
|
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a45cf80eb5c726d631eeebf77bfd3ae78">m_cache</a>.<a class="code" href="classripple_1_1KeyCache.html#ac997750bec1980c1899f604486eb45c8">clear</a>();</div>
|
|
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  ++<a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a02f7ec259bbd5a7e2a427403a312b69f">m_gen</a>;</div>
|
|
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  }</div>
|
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  </div>
|
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keywordtype">void</span></div>
|
|
<div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a5901f72842fa510c191e2ebecc366920"> 134</a></span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a5901f72842fa510c191e2ebecc366920">reset</a>()</div>
|
|
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  {</div>
|
|
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a45cf80eb5c726d631eeebf77bfd3ae78">m_cache</a>.<a class="code" href="classripple_1_1KeyCache.html#ac997750bec1980c1899f604486eb45c8">clear</a>();</div>
|
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a02f7ec259bbd5a7e2a427403a312b69f">m_gen</a> = 1;</div>
|
|
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  }</div>
|
|
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  </div>
|
|
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span> <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a45cf80eb5c726d631eeebf77bfd3ae78"> 141</a></span>  <a class="code" href="classripple_1_1KeyCache.html">KeyCache<Key></a> <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a45cf80eb5c726d631eeebf77bfd3ae78">m_cache</a>;</div>
|
|
<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a02f7ec259bbd5a7e2a427403a312b69f"> 142</a></span>  <a class="codeRef" href="http://en.cppreference.com/w/cpp/atomic/atomic.html">std::atomic<std::uint32_t></a> <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html#a02f7ec259bbd5a7e2a427403a312b69f">m_gen</a>;</div>
|
|
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> };</div>
|
|
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  </div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> } <span class="comment">// namespace detail</span></div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  </div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="namespaceripple.html#a7fb77fb8b47791f06668264c014603e2"> 147</a></span> <span class="keyword">using</span> <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html">FullBelowCache</a> = <a class="code" href="classripple_1_1detail_1_1BasicFullBelowCache.html">detail::BasicFullBelowCache<uint256></a>;</div>
|
|
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  </div>
|
|
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span> } <span class="comment">// namespace ripple</span></div>
|
|
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  </div>
|
|
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span> <span class="preprocessor">#endif</span></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<div class="ttc" id="aclassripple_1_1KeyCache_html_ab9ecd66501ebdc5d92af5f6f86d178ca"><div class="ttname"><a href="classripple_1_1KeyCache.html#ab9ecd66501ebdc5d92af5f6f86d178ca">ripple::KeyCache::size</a></div><div class="ttdeci">size_type size() const</div><div class="ttdoc">Returns the number of items in the container.</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00153">KeyCache.h:153</a></div></div>
|
|
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div><div class="ttdoc">STL class.</div></div>
|
|
<div class="ttc" id="ashared_ptr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr< Collector ></a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html">ripple::detail::BasicFullBelowCache</a></div><div class="ttdoc">Remembers which tree keys have all descendants resident.</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00037">FullBelowCache.h:37</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_a6e0eeda7864e33e83a5a6a61e1b66c88ae10ce03f09b314faadeff8cff304c326"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#a6e0eeda7864e33e83a5a6a61e1b66c88ae10ce03f09b314faadeff8cff304c326">ripple::detail::BasicFullBelowCache::defaultCacheTargetSize</a></div><div class="ttdeci">@ defaultCacheTargetSize</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00043">FullBelowCache.h:43</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_a75bf1d68ac90ebc1163e8e6bd0568752"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#a75bf1d68ac90ebc1163e8e6bd0568752">ripple::detail::BasicFullBelowCache::clock_type</a></div><div class="ttdeci">typename CacheType::clock_type clock_type</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00047">FullBelowCache.h:47</a></div></div>
|
|
<div class="ttc" id="aduration_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_a02f7ec259bbd5a7e2a427403a312b69f"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#a02f7ec259bbd5a7e2a427403a312b69f">ripple::detail::BasicFullBelowCache::m_gen</a></div><div class="ttdeci">std::atomic< std::uint32_t > m_gen</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00142">FullBelowCache.h:142</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_a5901f72842fa510c191e2ebecc366920"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#a5901f72842fa510c191e2ebecc366920">ripple::detail::BasicFullBelowCache::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00134">FullBelowCache.h:134</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1KeyCache_html_ad93a1bca0da205d937a9b9781ffab7c9"><div class="ttname"><a href="classripple_1_1KeyCache.html#ad93a1bca0da205d937a9b9781ffab7c9">ripple::KeyCache::touch_if_exists</a></div><div class="ttdeci">bool touch_if_exists(KeyComparable const &key)</div><div class="ttdoc">Refresh the last access time on a key if present.</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00234">KeyCache.h:234</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_a5e207e81c6878a8d26e48c8fdaad5859"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#a5e207e81c6878a8d26e48c8fdaad5859">ripple::detail::BasicFullBelowCache::touch_if_exists</a></div><div class="ttdeci">bool touch_if_exists(key_type const &key)</div><div class="ttdoc">Refresh the last access time of an item, if it exists.</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00101">FullBelowCache.h:101</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1KeyCache_html_a72fad1c7856e2c855e32de68eed56f82"><div class="ttname"><a href="classripple_1_1KeyCache.html#a72fad1c7856e2c855e32de68eed56f82">ripple::KeyCache::insert</a></div><div class="ttdeci">bool insert(Key const &key)</div><div class="ttdoc">Insert the specified key.</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00213">KeyCache.h:213</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_a6cdb5c5c5ec9f0e77685ae8413cbb4cc"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#a6cdb5c5c5ec9f0e77685ae8413cbb4cc">ripple::detail::BasicFullBelowCache::BasicFullBelowCache</a></div><div class="ttdeci">BasicFullBelowCache(std::string const &name, clock_type &clock, beast::insight::Collector::ptr const &collector=beast::insight::NullCollector::New(), std::size_t target_size=defaultCacheTargetSize, std::chrono::seconds expiration=std::chrono::minutes{2})</div><div class="ttdoc">Construct the cache.</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00056">FullBelowCache.h:56</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_abc3d54fc0e19eb02dfb80cb16b46a61c"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#abc3d54fc0e19eb02dfb80cb16b46a61c">ripple::detail::BasicFullBelowCache::sweep</a></div><div class="ttdeci">void sweep()</div><div class="ttdoc">Remove expired cache items.</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00089">FullBelowCache.h:89</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1KeyCache_html_a08e89647e3c3229104230c925433920d"><div class="ttname"><a href="classripple_1_1KeyCache.html#a08e89647e3c3229104230c925433920d">ripple::KeyCache< Key >::clock_type</a></div><div class="ttdeci">beast::abstract_clock< std::chrono::steady_clock > clock_type</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00047">KeyCache.h:47</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_a11d4cb29d2faa05a9f737e9a77c375dc"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#a11d4cb29d2faa05a9f737e9a77c375dc">ripple::detail::BasicFullBelowCache::clock</a></div><div class="ttdeci">clock_type & clock()</div><div class="ttdoc">Return the clock associated with the cache.</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00069">FullBelowCache.h:69</a></div></div>
|
|
<div class="ttc" id="ainteger_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a></div></div>
|
|
<div class="ttc" id="aatomic_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/atomic.html">atomic</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1KeyCache_html_a774eec36bd59b6a346ef7a613734d921"><div class="ttname"><a href="classripple_1_1KeyCache.html#a774eec36bd59b6a346ef7a613734d921">ripple::KeyCache::sweep</a></div><div class="ttdeci">void sweep()</div><div class="ttdoc">Remove stale entries from the cache.</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00267">KeyCache.h:267</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1KeyCache_html_ac997750bec1980c1899f604486eb45c8"><div class="ttname"><a href="classripple_1_1KeyCache.html#ac997750bec1980c1899f604486eb45c8">ripple::KeyCache::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdoc">Empty the cache.</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00161">KeyCache.h:161</a></div></div>
|
|
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="RCLCensorshipDetector_8h_source.html#l00029">RCLCensorshipDetector.h:29</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_a24dcba9ab4a873d9d002a903585fff45"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#a24dcba9ab4a873d9d002a903585fff45">ripple::detail::BasicFullBelowCache::getGeneration</a></div><div class="ttdeci">std::uint32_t getGeneration(void) const</div><div class="ttdoc">generation determines whether cached entry is valid</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00121">FullBelowCache.h:121</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1KeyCache_html_a27ffdc83af477dfc719054907918a148"><div class="ttname"><a href="classripple_1_1KeyCache.html#a27ffdc83af477dfc719054907918a148">ripple::KeyCache< Key >::size_type</a></div><div class="ttdeci">typename map_type::size_type size_type</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00087">KeyCache.h:87</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_aae7b2e296d6e1572c20fad56bc9aba31"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#aae7b2e296d6e1572c20fad56bc9aba31">ripple::detail::BasicFullBelowCache::size_type</a></div><div class="ttdeci">typename CacheType::size_type size_type</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00046">FullBelowCache.h:46</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_a2d15ae999cbf512e349a9b9c9116359b"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#a2d15ae999cbf512e349a9b9c9116359b">ripple::detail::BasicFullBelowCache::size</a></div><div class="ttdeci">size_type size() const</div><div class="ttdoc">Return the number of elements in the cache.</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00079">FullBelowCache.h:79</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_a6344198691e605702d23eba86a3177b2"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#a6344198691e605702d23eba86a3177b2">ripple::detail::BasicFullBelowCache::insert</a></div><div class="ttdeci">void insert(key_type const &key)</div><div class="ttdoc">Insert a key into the cache.</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00114">FullBelowCache.h:114</a></div></div>
|
|
<div class="ttc" id="asize_t_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1KeyCache_html_a0cbb2397d4e536bf904871481ca03056"><div class="ttname"><a href="classripple_1_1KeyCache.html#a0cbb2397d4e536bf904871481ca03056">ripple::KeyCache::clock</a></div><div class="ttdeci">clock_type & clock()</div><div class="ttdoc">Return the clock associated with the cache.</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00146">KeyCache.h:146</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1KeyCache_html"><div class="ttname"><a href="classripple_1_1KeyCache.html">ripple::KeyCache< Key ></a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_a45cf80eb5c726d631eeebf77bfd3ae78"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#a45cf80eb5c726d631eeebf77bfd3ae78">ripple::detail::BasicFullBelowCache::m_cache</a></div><div class="ttdeci">KeyCache< Key > m_cache</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00141">FullBelowCache.h:141</a></div></div>
|
|
<div class="ttc" id="aclassbeast_1_1insight_1_1NullCollector_html_a8821f08e6db108aacae400a738286da6"><div class="ttname"><a href="classbeast_1_1insight_1_1NullCollector.html#a8821f08e6db108aacae400a738286da6">beast::insight::NullCollector::New</a></div><div class="ttdeci">static std::shared_ptr< Collector > New()</div><div class="ttdef"><b>Definition:</b> <a href="NullCollector_8cpp_source.html#l00152">NullCollector.cpp:152</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_ab848d9b7735bd22c13ce05478c322aca"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#ab848d9b7735bd22c13ce05478c322aca">ripple::detail::BasicFullBelowCache::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00127">FullBelowCache.h:127</a></div></div>
|
|
<div class="ttc" id="aclassripple_1_1detail_1_1BasicFullBelowCache_html_af834351ef2de493fa8077fad69f63608"><div class="ttname"><a href="classripple_1_1detail_1_1BasicFullBelowCache.html#af834351ef2de493fa8077fad69f63608">ripple::detail::BasicFullBelowCache::key_type</a></div><div class="ttdeci">Key key_type</div><div class="ttdef"><b>Definition:</b> <a href="FullBelowCache_8h_source.html#l00045">FullBelowCache.h:45</a></div></div>
|
|
<div class="ttc" id="astring_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/string.html">string</a></div></div>
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|