This commit is contained in:
manojsdoshi
2020-04-24 01:09:47 +00:00
parent 4ad595bf18
commit 430f6c0cf3
2864 changed files with 304301 additions and 292875 deletions

View File

@@ -91,8 +91,8 @@ $(function() {
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#ifndef RIPPLE_NODESTORE_DATABASENODEIMP_H_INCLUDED</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#define RIPPLE_NODESTORE_DATABASENODEIMP_H_INCLUDED</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;ripple/nodestore/Database.h&gt;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;ripple/basics/chrono.h&gt;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;ripple/basics/chrono.h&gt;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;ripple/nodestore/Database.h&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="keyword">namespace </span>NodeStore {</div>
@@ -102,165 +102,181 @@ $(function() {
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#aeb5a2f3b5e526ef3a0ac87b7653e828b">DatabaseNodeImp</a>() = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#aeb5a2f3b5e526ef3a0ac87b7653e828b">DatabaseNodeImp</a>(<a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html">DatabaseNodeImp</a> <span class="keyword">const</span>&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html">DatabaseNodeImp</a>&amp; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#ae264a5c85e4339eebb71bc2f8477516a">operator=</a>(<a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html">DatabaseNodeImp</a> <span class="keyword">const</span>&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a4c17cdf34e0eafb2907eab36b242cadb"> 36</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a4c17cdf34e0eafb2907eab36b242cadb">DatabaseNodeImp</a>(</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; name,</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1Scheduler.html">Scheduler</a>&amp; scheduler,</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keywordtype">int</span> readThreads,</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; <a class="code" href="classripple_1_1Stoppable.html">Stoppable</a>&amp; parent,</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;Backend&gt;</a> backend,</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <a class="code" href="classripple_1_1Section.html">Section</a> <span class="keyword">const</span>&amp; config,</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <a class="code" href="classbeast_1_1Journal.html">beast::Journal</a> j)</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; : <a class="code" href="classripple_1_1NodeStore_1_1Database.html">Database</a>(name, parent, scheduler, readThreads, config, j)</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; , <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5">pCache_</a>(<a class="code" href="namespacestd.html">std</a>::make_shared&lt;<a class="code" href="classripple_1_1TaggedCache.html">TaggedCache</a>&lt;<a class="code" href="classripple_1_1base__uint.html">uint256</a>, <a class="code" href="classripple_1_1NodeObject.html">NodeObject</a>&gt;&gt;(</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; name, <a class="code" href="namespaceripple_1_1NodeStore.html#ab026118fd22b5e7db14b5dea6938aaa8a82fcd9983079b023efaf136078d3d2d3">cacheTargetSize</a>, <a class="code" href="namespaceripple_1_1NodeStore.html#a41cef3aa8ed33b8fa1b438ed7b6d1287">cacheTargetAge</a>, <a class="code" href="namespaceripple.html#ac70521ab6e1277870a9e400e7a08e937">stopwatch</a>(), j))</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; , <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a8c8554053c68cd10c47edf735bcda7ad">nCache_</a>(<a class="code" href="namespacestd.html">std</a>::make_shared&lt;<a class="code" href="classripple_1_1KeyCache.html">KeyCache</a>&lt;<a class="code" href="classripple_1_1base__uint.html">uint256</a>&gt;&gt;(</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; name, <a class="code" href="namespaceripple.html#ac70521ab6e1277870a9e400e7a08e937">stopwatch</a>(), <a class="code" href="namespaceripple_1_1NodeStore.html#ab026118fd22b5e7db14b5dea6938aaa8a82fcd9983079b023efaf136078d3d2d3">cacheTargetSize</a>, <a class="code" href="namespaceripple_1_1NodeStore.html#a41cef3aa8ed33b8fa1b438ed7b6d1287">cacheTargetAge</a>))</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; , <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>(<a class="code" href="namespacestd.html">std</a>::move(backend))</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; {</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; assert(<a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>);</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <a class="code" href="classripple_1_1Stoppable.html#adea135697761febf430a8628814c7902">setParent</a>(parent);</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; }</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a1d43ea3b85274618e9278a6bc4f0e417"> 55</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a1d43ea3b85274618e9278a6bc4f0e417">~DatabaseNodeImp</a>()<span class="keyword"> override</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="comment">// Stop threads before data members are destroyed.</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1Database.html#ab8f5eeb95d1166af47301d041b3063f2">stopThreads</a>();</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; }</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; </div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2fb3e575c65dfb865877a15b7a365763"> 62</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2fb3e575c65dfb865877a15b7a365763">getName</a>()<span class="keyword"> const override</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>-&gt;getName();</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; }</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; </div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a></div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#aa8d9a1100a8db28cf142e8fe32aee440"> 68</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#aa8d9a1100a8db28cf142e8fe32aee440">getWriteLoad</a>()<span class="keyword"> const override</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>-&gt;getWriteLoad();</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; }</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; </div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2917747708b498ce8b0a24e074aa5b1f"> 74</a></span>&#160; <span class="keyword">import</span>(<a class="code" href="classripple_1_1NodeStore_1_1Database.html">Database</a>&amp; source) <span class="keyword">override</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; {</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1Database.html#af885d9fe877259a258481f0df20697cd">importInternal</a>(*<a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>.get(), source);</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; }</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; </div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a5f3aa8b51b264bb5d1fe815d67fc8c98">store</a>(<a class="code" href="namespaceripple.html#a57d7e7b27df7e719fdf5569f96be60a3">NodeObjectType</a> type, <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">Blob</a>&amp;&amp; data,</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>&amp; hash, <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> seq) <span class="keyword">override</span>;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; </div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;NodeObject&gt;</a></div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#af1d350946ec4cb8b65fd6796727d47b0"> 84</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#af1d350946ec4cb8b65fd6796727d47b0">fetch</a>(<a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>&amp; hash, <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> seq)<span class="keyword"> override</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a1eb657a3b7c4b409f9640b82c11ed89e">doFetch</a>(hash, seq, *<a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5">pCache_</a>, *<a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a8c8554053c68cd10c47edf735bcda7ad">nCache_</a>, <span class="keyword">false</span>);</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; }</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keywordtype">bool</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#ab1c2b150933ce2628c9457ac4ab87402">asyncFetch</a>(<a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>&amp; hash, <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> seq,</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;NodeObject&gt;</a>&amp; <span class="keywordtype">object</span>) <span class="keyword">override</span>;</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; </div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keywordtype">bool</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a727c96f7f30d04345184be123dfe1137"> 94</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a727c96f7f30d04345184be123dfe1137">storeLedger</a>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;Ledger const&gt;</a> <span class="keyword">const</span>&amp; srcLedger)<span class="keyword"> override</span></div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#aad7aa12d0cc01006120761d23312d428">Database::storeLedger</a>(</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; *srcLedger, <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>, <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5">pCache_</a>, <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a8c8554053c68cd10c47edf735bcda7ad">nCache_</a>, <span class="keyword">nullptr</span>);</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html">DatabaseNodeImp</a>&amp;</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#ae264a5c85e4339eebb71bc2f8477516a">operator=</a>(<a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html">DatabaseNodeImp</a> <span class="keyword">const</span>&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; </div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a4c17cdf34e0eafb2907eab36b242cadb"> 37</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a4c17cdf34e0eafb2907eab36b242cadb">DatabaseNodeImp</a>(</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <span class="keyword">const</span>&amp; name,</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1Scheduler.html">Scheduler</a>&amp; scheduler,</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; <span class="keywordtype">int</span> readThreads,</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <a class="code" href="classripple_1_1Stoppable.html">Stoppable</a>&amp; parent,</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;Backend&gt;</a> backend,</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <a class="code" href="classripple_1_1Section.html">Section</a> <span class="keyword">const</span>&amp; config,</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <a class="code" href="classbeast_1_1Journal.html">beast::Journal</a> j)</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; : <a class="code" href="classripple_1_1NodeStore_1_1Database.html">Database</a>(name, parent, scheduler, readThreads, config, j)</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; , <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5">pCache_</a>(<a class="code" href="namespacestd.html">std</a>::make_shared&lt;<a class="code" href="classripple_1_1TaggedCache.html">TaggedCache</a>&lt;<a class="code" href="classripple_1_1base__uint.html">uint256</a>, <a class="code" href="classripple_1_1NodeObject.html">NodeObject</a>&gt;&gt;(</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; name,</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <a class="code" href="namespaceripple_1_1NodeStore.html#ab026118fd22b5e7db14b5dea6938aaa8a82fcd9983079b023efaf136078d3d2d3">cacheTargetSize</a>,</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <a class="code" href="namespaceripple_1_1NodeStore.html#a41cef3aa8ed33b8fa1b438ed7b6d1287">cacheTargetAge</a>,</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <a class="code" href="namespaceripple.html#ac70521ab6e1277870a9e400e7a08e937">stopwatch</a>(),</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; j))</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; , <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a8c8554053c68cd10c47edf735bcda7ad">nCache_</a>(<a class="code" href="namespacestd.html">std</a>::make_shared&lt;<a class="code" href="classripple_1_1KeyCache.html">KeyCache</a>&lt;<a class="code" href="classripple_1_1base__uint.html">uint256</a>&gt;&gt;(</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; name,</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <a class="code" href="namespaceripple.html#ac70521ab6e1277870a9e400e7a08e937">stopwatch</a>(),</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <a class="code" href="namespaceripple_1_1NodeStore.html#ab026118fd22b5e7db14b5dea6938aaa8a82fcd9983079b023efaf136078d3d2d3">cacheTargetSize</a>,</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <a class="code" href="namespaceripple_1_1NodeStore.html#a41cef3aa8ed33b8fa1b438ed7b6d1287">cacheTargetAge</a>))</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; , <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>(<a class="code" href="namespacestd.html">std</a>::move(backend))</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; {</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; assert(<a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>);</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <a class="code" href="classripple_1_1Stoppable.html#adea135697761febf430a8628814c7902">setParent</a>(parent);</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; }</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; </div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a1d43ea3b85274618e9278a6bc4f0e417"> 63</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a1d43ea3b85274618e9278a6bc4f0e417">~DatabaseNodeImp</a>()<span class="keyword"> override</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="comment">// Stop threads before data members are destroyed.</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1Database.html#ab8f5eeb95d1166af47301d041b3063f2">stopThreads</a>();</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; }</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2fb3e575c65dfb865877a15b7a365763"> 70</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2fb3e575c65dfb865877a15b7a365763">getName</a>()<span class="keyword"> const override</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>-&gt;getName();</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; }</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; </div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a></div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#aa8d9a1100a8db28cf142e8fe32aee440"> 76</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#aa8d9a1100a8db28cf142e8fe32aee440">getWriteLoad</a>()<span class="keyword"> const override</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>-&gt;getWriteLoad();</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; }</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2917747708b498ce8b0a24e074aa5b1f"> 82</a></span>&#160; <span class="keyword">import</span>(<a class="code" href="classripple_1_1NodeStore_1_1Database.html">Database</a>&amp; source) <span class="keyword">override</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; {</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1Database.html#af885d9fe877259a258481f0df20697cd">importInternal</a>(*<a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>.get(), source);</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; }</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; </div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a5f3aa8b51b264bb5d1fe815d67fc8c98">store</a>(</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <a class="code" href="namespaceripple.html#a57d7e7b27df7e719fdf5569f96be60a3">NodeObjectType</a> type,</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/container/vector.html">Blob</a>&amp;&amp; data,</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>&amp; hash,</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> seq) <span class="keyword">override</span>;</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; </div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;NodeObject&gt;</a></div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#af1d350946ec4cb8b65fd6796727d47b0"> 95</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#af1d350946ec4cb8b65fd6796727d47b0">fetch</a>(<a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>&amp; hash, <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> seq)<span class="keyword"> override</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a1eb657a3b7c4b409f9640b82c11ed89e">doFetch</a>(hash, seq, *<a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5">pCache_</a>, *<a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a8c8554053c68cd10c47edf735bcda7ad">nCache_</a>, <span class="keyword">false</span>);</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; }</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; </div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keywordtype">int</span></div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#ae2e94ab9ba7f97c7a5c5bdcc67884990"> 101</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#ae2e94ab9ba7f97c7a5c5bdcc67884990">getDesiredAsyncReadCount</a>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> seq)<span class="keyword"> override</span></div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="comment">// We prefer a client not fill our cache</span></div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="comment">// We don&#39;t want to push data out of the cache</span></div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <span class="comment">// before it&#39;s retrieved</span></div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5">pCache_</a>-&gt;getTargetSize() / <a class="code" href="namespaceripple_1_1NodeStore.html#ab026118fd22b5e7db14b5dea6938aaa8ac33a634d0db63027973fd6d4ac0b5433">asyncDivider</a>;</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; }</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="keywordtype">float</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a7ebd8f4f939df30f4cfa04b2b571be02"> 110</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a7ebd8f4f939df30f4cfa04b2b571be02">getCacheHitRate</a>()<span class="keyword"> override </span>{<span class="keywordflow">return</span> <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5">pCache_</a>-&gt;getHitRate();}</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; </div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#abe504ac619dae082bd15d7f16d12b786">tune</a>(<span class="keywordtype">int</span> size, <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a> age) <span class="keyword">override</span>;</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; </div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#af83b106a8e0f80ef92cc3140e1112ec0">sweep</a>() <span class="keyword">override</span>;</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="comment">// Positive cache</span></div>
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5"> 120</a></span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;TaggedCache&lt;uint256, NodeObject&gt;</a>&gt; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5">pCache_</a>;</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keywordtype">bool</span></div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#ab1c2b150933ce2628c9457ac4ab87402">asyncFetch</a>(</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>&amp; hash,</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> seq,</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;NodeObject&gt;</a>&amp; <span class="keywordtype">object</span>) <span class="keyword">override</span>;</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; </div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="keywordtype">bool</span></div>
<div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a727c96f7f30d04345184be123dfe1137"> 107</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a727c96f7f30d04345184be123dfe1137">storeLedger</a>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;Ledger const&gt;</a> <span class="keyword">const</span>&amp; srcLedger)<span class="keyword"> override</span></div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#aad7aa12d0cc01006120761d23312d428">Database::storeLedger</a>(</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; *srcLedger, <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>, <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5">pCache_</a>, <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a8c8554053c68cd10c47edf735bcda7ad">nCache_</a>, <span class="keyword">nullptr</span>);</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; }</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; </div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="keywordtype">int</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#ae2e94ab9ba7f97c7a5c5bdcc67884990"> 114</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#ae2e94ab9ba7f97c7a5c5bdcc67884990">getDesiredAsyncReadCount</a>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> seq)<span class="keyword"> override</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="comment">// We prefer a client not fill our cache</span></div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="comment">// We don&#39;t want to push data out of the cache</span></div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="comment">// before it&#39;s retrieved</span></div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5">pCache_</a>-&gt;getTargetSize() / <a class="code" href="namespaceripple_1_1NodeStore.html#ab026118fd22b5e7db14b5dea6938aaa8ac33a634d0db63027973fd6d4ac0b5433">asyncDivider</a>;</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; }</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; </div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <span class="comment">// Negative cache</span></div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a8c8554053c68cd10c47edf735bcda7ad"> 123</a></span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;KeyCache&lt;uint256&gt;</a>&gt; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a8c8554053c68cd10c47edf735bcda7ad">nCache_</a>;</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; </div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <span class="comment">// Persistent key/value storage</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503"> 126</a></span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;Backend&gt;</a> <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>;</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <span class="keywordtype">float</span></div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a7ebd8f4f939df30f4cfa04b2b571be02"> 123</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a7ebd8f4f939df30f4cfa04b2b571be02">getCacheHitRate</a>()<span class="keyword"> override</span></div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5">pCache_</a>-&gt;getHitRate();</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; }</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;NodeObject&gt;</a></div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a6a2d6bc9736216dd4ed0d667b1aa70d5"> 129</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a6a2d6bc9736216dd4ed0d667b1aa70d5">fetchFrom</a>(<a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>&amp; hash, <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> seq)<span class="keyword"> override</span></div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a109754c4bed6627ba778fa84244177a4">fetchInternal</a>(hash, <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>);</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; }</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#abe504ac619dae082bd15d7f16d12b786">tune</a>(<span class="keywordtype">int</span> size, <a class="codeRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a> age) <span class="keyword">override</span>;</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; </div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#af83b106a8e0f80ef92cc3140e1112ec0">sweep</a>() <span class="keyword">override</span>;</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; </div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a6692b0758fc43e2d78520ff5e699e8b1"> 135</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a6692b0758fc43e2d78520ff5e699e8b1">for_each</a>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a>&lt;<span class="keywordtype">void</span>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;NodeObject&gt;</a>)&gt; f)<span class="keyword"> override</span></div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>-&gt;for_each(f);</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; }</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;};</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="comment">// Positive cache</span></div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5"> 136</a></span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;TaggedCache&lt;uint256, NodeObject&gt;</a>&gt; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5">pCache_</a>;</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; </div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="comment">// Negative cache</span></div>
<div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a8c8554053c68cd10c47edf735bcda7ad"> 139</a></span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;KeyCache&lt;uint256&gt;</a>&gt; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a8c8554053c68cd10c47edf735bcda7ad">nCache_</a>;</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; </div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;}</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;}</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="comment">// Persistent key/value storage</span></div>
<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503"> 142</a></span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;Backend&gt;</a> <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>;</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; </div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;NodeObject&gt;</a></div>
<div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a6a2d6bc9736216dd4ed0d667b1aa70d5"> 145</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a6a2d6bc9736216dd4ed0d667b1aa70d5">fetchFrom</a>(<a class="code" href="classripple_1_1base__uint.html">uint256</a> <span class="keyword">const</span>&amp; hash, <a class="codeRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> seq)<span class="keyword"> override</span></div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classripple_1_1NodeStore_1_1Database.html#a109754c4bed6627ba778fa84244177a4">fetchInternal</a>(hash, <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>);</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; }</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; </div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="keywordtype">void</span></div>
<div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a6692b0758fc43e2d78520ff5e699e8b1"> 151</a></span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a6692b0758fc43e2d78520ff5e699e8b1">for_each</a>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a>&lt;<span class="keywordtype">void</span>(<a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;NodeObject&gt;</a>)&gt; f)<span class="keyword"> override</span></div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">backend_</a>-&gt;for_each(f);</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; }</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;};</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; </div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;} <span class="comment">// namespace NodeStore</span></div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;} <span class="comment">// namespace ripple</span></div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; </div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclassripple_1_1Section_html"><div class="ttname"><a href="classripple_1_1Section.html">ripple::Section</a></div><div class="ttdoc">Holds a collection of configuration values.</div><div class="ttdef"><b>Definition:</b> <a href="BasicConfig_8h_source.html#l00043">BasicConfig.h:43</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a2edc67988dfa89034505c059fbe41503"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">ripple::NodeStore::DatabaseNodeImp::backend_</a></div><div class="ttdeci">std::shared_ptr&lt; Backend &gt; backend_</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00126">DatabaseNodeImp.h:126</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_aa8d9a1100a8db28cf142e8fe32aee440"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#aa8d9a1100a8db28cf142e8fe32aee440">ripple::NodeStore::DatabaseNodeImp::getWriteLoad</a></div><div class="ttdeci">std::int32_t getWriteLoad() const override</div><div class="ttdoc">Retrieve the estimated number of pending write operations.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00068">DatabaseNodeImp.h:68</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a2edc67988dfa89034505c059fbe41503"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2edc67988dfa89034505c059fbe41503">ripple::NodeStore::DatabaseNodeImp::backend_</a></div><div class="ttdeci">std::shared_ptr&lt; Backend &gt; backend_</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00142">DatabaseNodeImp.h:142</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_aa8d9a1100a8db28cf142e8fe32aee440"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#aa8d9a1100a8db28cf142e8fe32aee440">ripple::NodeStore::DatabaseNodeImp::getWriteLoad</a></div><div class="ttdeci">std::int32_t getWriteLoad() const override</div><div class="ttdoc">Retrieve the estimated number of pending write operations.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00076">DatabaseNodeImp.h:76</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a5f3aa8b51b264bb5d1fe815d67fc8c98"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a5f3aa8b51b264bb5d1fe815d67fc8c98">ripple::NodeStore::DatabaseNodeImp::store</a></div><div class="ttdeci">void store(NodeObjectType type, Blob &amp;&amp;data, uint256 const &amp;hash, std::uint32_t seq) override</div><div class="ttdoc">Store the object.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8cpp_source.html#l00028">DatabaseNodeImp.cpp:28</a></div></div>
<div class="ttc" id="anamespaceripple_1_1NodeStore_html_ab026118fd22b5e7db14b5dea6938aaa8a82fcd9983079b023efaf136078d3d2d3"><div class="ttname"><a href="namespaceripple_1_1NodeStore.html#ab026118fd22b5e7db14b5dea6938aaa8a82fcd9983079b023efaf136078d3d2d3">ripple::NodeStore::cacheTargetSize</a></div><div class="ttdeci">@ cacheTargetSize</div><div class="ttdef"><b>Definition:</b> <a href="nodestore_2impl_2Tuning_8h_source.html#l00029">nodestore/impl/Tuning.h:29</a></div></div>
<div class="ttc" id="anamespaceripple_1_1NodeStore_html_ab026118fd22b5e7db14b5dea6938aaa8a82fcd9983079b023efaf136078d3d2d3"><div class="ttname"><a href="namespaceripple_1_1NodeStore.html#ab026118fd22b5e7db14b5dea6938aaa8a82fcd9983079b023efaf136078d3d2d3">ripple::NodeStore::cacheTargetSize</a></div><div class="ttdeci">@ cacheTargetSize</div><div class="ttdef"><b>Definition:</b> <a href="nodestore_2impl_2Tuning_8h_source.html#l00028">nodestore/impl/Tuning.h:28</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html">ripple::NodeStore::Database</a></div><div class="ttdoc">Persistency layer for NodeObject.</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00053">Database.h:53</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</a></div><div class="ttdoc">STL class.</div></div>
<div class="ttc" id="aclassripple_1_1TaggedCache_html"><div class="ttname"><a href="classripple_1_1TaggedCache.html">ripple::TaggedCache</a></div><div class="ttdoc">Map/cache combination.</div><div class="ttdef"><b>Definition:</b> <a href="TaggedCache_8h_source.html#l00055">TaggedCache.h:55</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a1eb657a3b7c4b409f9640b82c11ed89e"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a1eb657a3b7c4b409f9640b82c11ed89e">ripple::NodeStore::Database::doFetch</a></div><div class="ttdeci">std::shared_ptr&lt; NodeObject &gt; doFetch(uint256 const &amp;hash, std::uint32_t seq, TaggedCache&lt; uint256, NodeObject &gt; &amp;pCache, KeyCache&lt; uint256 &gt; &amp;nCache, bool isAsync)</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00189">Database.cpp:189</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a6a2d6bc9736216dd4ed0d667b1aa70d5"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a6a2d6bc9736216dd4ed0d667b1aa70d5">ripple::NodeStore::DatabaseNodeImp::fetchFrom</a></div><div class="ttdeci">std::shared_ptr&lt; NodeObject &gt; fetchFrom(uint256 const &amp;hash, std::uint32_t seq) override</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00129">DatabaseNodeImp.h:129</a></div></div>
<div class="ttc" id="aclassripple_1_1TaggedCache_html"><div class="ttname"><a href="classripple_1_1TaggedCache.html">ripple::TaggedCache</a></div><div class="ttdoc">Map/cache combination.</div><div class="ttdef"><b>Definition:</b> <a href="TaggedCache_8h_source.html#l00054">TaggedCache.h:54</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a1eb657a3b7c4b409f9640b82c11ed89e"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a1eb657a3b7c4b409f9640b82c11ed89e">ripple::NodeStore::Database::doFetch</a></div><div class="ttdeci">std::shared_ptr&lt; NodeObject &gt; doFetch(uint256 const &amp;hash, std::uint32_t seq, TaggedCache&lt; uint256, NodeObject &gt; &amp;pCache, KeyCache&lt; uint256 &gt; &amp;nCache, bool isAsync)</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00184">Database.cpp:184</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a6a2d6bc9736216dd4ed0d667b1aa70d5"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a6a2d6bc9736216dd4ed0d667b1aa70d5">ripple::NodeStore::DatabaseNodeImp::fetchFrom</a></div><div class="ttdeci">std::shared_ptr&lt; NodeObject &gt; fetchFrom(uint256 const &amp;hash, std::uint32_t seq) override</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00145">DatabaseNodeImp.h:145</a></div></div>
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector&lt; unsigned char &gt;</a></div></div>
<div class="ttc" id="anamespaceripple_html_a57d7e7b27df7e719fdf5569f96be60a3"><div class="ttname"><a href="namespaceripple.html#a57d7e7b27df7e719fdf5569f96be60a3">ripple::NodeObjectType</a></div><div class="ttdeci">NodeObjectType</div><div class="ttdoc">The types of node objects.</div><div class="ttdef"><b>Definition:</b> <a href="NodeObject_8h_source.html#l00032">NodeObject.h:32</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_1NodeStore_1_1DatabaseNodeImp_html"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html">ripple::NodeStore::DatabaseNodeImp</a></div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00029">DatabaseNodeImp.h:29</a></div></div>
<div class="ttc" id="anamespaceripple_html_ac70521ab6e1277870a9e400e7a08e937"><div class="ttname"><a href="namespaceripple.html#ac70521ab6e1277870a9e400e7a08e937">ripple::stopwatch</a></div><div class="ttdeci">Stopwatch &amp; stopwatch()</div><div class="ttdoc">Returns an instance of a wall clock.</div><div class="ttdef"><b>Definition:</b> <a href="chrono_8h_source.html#l00087">chrono.h:87</a></div></div>
<div class="ttc" id="anamespaceripple_html_ac70521ab6e1277870a9e400e7a08e937"><div class="ttname"><a href="namespaceripple.html#ac70521ab6e1277870a9e400e7a08e937">ripple::stopwatch</a></div><div class="ttdeci">Stopwatch &amp; stopwatch()</div><div class="ttdoc">Returns an instance of a wall clock.</div><div class="ttdef"><b>Definition:</b> <a href="chrono_8h_source.html#l00086">chrono.h:86</a></div></div>
<div class="ttc" id="afunction_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/functional/function.html">std::function</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_abe504ac619dae082bd15d7f16d12b786"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#abe504ac619dae082bd15d7f16d12b786">ripple::NodeStore::DatabaseNodeImp::tune</a></div><div class="ttdeci">void tune(int size, std::chrono::seconds age) override</div><div class="ttdoc">Set the maximum number of entries and maximum cache age for both caches.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8cpp_source.html#l00052">DatabaseNodeImp.cpp:52</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a6692b0758fc43e2d78520ff5e699e8b1"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a6692b0758fc43e2d78520ff5e699e8b1">ripple::NodeStore::DatabaseNodeImp::for_each</a></div><div class="ttdeci">void for_each(std::function&lt; void(std::shared_ptr&lt; NodeObject &gt;)&gt; f) override</div><div class="ttdoc">Visit every object in the database This is usually called during import.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00135">DatabaseNodeImp.h:135</a></div></div>
<div class="ttc" id="aclassripple_1_1Stoppable_html_adea135697761febf430a8628814c7902"><div class="ttname"><a href="classripple_1_1Stoppable.html#adea135697761febf430a8628814c7902">ripple::Stoppable::setParent</a></div><div class="ttdeci">void setParent(Stoppable &amp;parent)</div><div class="ttdoc">Set the parent of this Stoppable.</div><div class="ttdef"><b>Definition:</b> <a href="Stoppable_8cpp_source.html#l00046">Stoppable.cpp:46</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a7ebd8f4f939df30f4cfa04b2b571be02"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a7ebd8f4f939df30f4cfa04b2b571be02">ripple::NodeStore::DatabaseNodeImp::getCacheHitRate</a></div><div class="ttdeci">float getCacheHitRate() override</div><div class="ttdoc">Get the positive cache hits to total attempts ratio.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00110">DatabaseNodeImp.h:110</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_abe504ac619dae082bd15d7f16d12b786"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#abe504ac619dae082bd15d7f16d12b786">ripple::NodeStore::DatabaseNodeImp::tune</a></div><div class="ttdeci">void tune(int size, std::chrono::seconds age) override</div><div class="ttdoc">Set the maximum number of entries and maximum cache age for both caches.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8cpp_source.html#l00057">DatabaseNodeImp.cpp:57</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a6692b0758fc43e2d78520ff5e699e8b1"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a6692b0758fc43e2d78520ff5e699e8b1">ripple::NodeStore::DatabaseNodeImp::for_each</a></div><div class="ttdeci">void for_each(std::function&lt; void(std::shared_ptr&lt; NodeObject &gt;)&gt; f) override</div><div class="ttdoc">Visit every object in the database This is usually called during import.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00151">DatabaseNodeImp.h:151</a></div></div>
<div class="ttc" id="aclassripple_1_1Stoppable_html_adea135697761febf430a8628814c7902"><div class="ttname"><a href="classripple_1_1Stoppable.html#adea135697761febf430a8628814c7902">ripple::Stoppable::setParent</a></div><div class="ttdeci">void setParent(Stoppable &amp;parent)</div><div class="ttdoc">Set the parent of this Stoppable.</div><div class="ttdef"><b>Definition:</b> <a href="Stoppable_8cpp_source.html#l00043">Stoppable.cpp:43</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a7ebd8f4f939df30f4cfa04b2b571be02"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a7ebd8f4f939df30f4cfa04b2b571be02">ripple::NodeStore::DatabaseNodeImp::getCacheHitRate</a></div><div class="ttdeci">float getCacheHitRate() override</div><div class="ttdoc">Get the positive cache hits to total attempts ratio.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00123">DatabaseNodeImp.h:123</a></div></div>
<div class="ttc" id="aclassripple_1_1base__uint_html"><div class="ttname"><a href="classripple_1_1base__uint.html">ripple::base_uint&lt; 256 &gt;</a></div></div>
<div class="ttc" id="aclassripple_1_1Stoppable_html"><div class="ttname"><a href="classripple_1_1Stoppable.html">ripple::Stoppable</a></div><div class="ttdoc">Provides an interface for starting and stopping.</div><div class="ttdef"><b>Definition:</b> <a href="Stoppable_8h_source.html#l00200">Stoppable.h:200</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_af885d9fe877259a258481f0df20697cd"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#af885d9fe877259a258481f0df20697cd">ripple::NodeStore::Database::importInternal</a></div><div class="ttdeci">void importInternal(Backend &amp;dstBackend, Database &amp;srcDB)</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00161">Database.cpp:161</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_ae2e94ab9ba7f97c7a5c5bdcc67884990"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#ae2e94ab9ba7f97c7a5c5bdcc67884990">ripple::NodeStore::DatabaseNodeImp::getDesiredAsyncReadCount</a></div><div class="ttdeci">int getDesiredAsyncReadCount(std::uint32_t seq) override</div><div class="ttdoc">Get the maximum number of async reads the node store prefers.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00101">DatabaseNodeImp.h:101</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a43f4e702f8a28e14e0bbe08e1b6c6aa5"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5">ripple::NodeStore::DatabaseNodeImp::pCache_</a></div><div class="ttdeci">std::shared_ptr&lt; TaggedCache&lt; uint256, NodeObject &gt; &gt; pCache_</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00120">DatabaseNodeImp.h:120</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_af885d9fe877259a258481f0df20697cd"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#af885d9fe877259a258481f0df20697cd">ripple::NodeStore::Database::importInternal</a></div><div class="ttdeci">void importInternal(Backend &amp;dstBackend, Database &amp;srcDB)</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00158">Database.cpp:158</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_ae2e94ab9ba7f97c7a5c5bdcc67884990"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#ae2e94ab9ba7f97c7a5c5bdcc67884990">ripple::NodeStore::DatabaseNodeImp::getDesiredAsyncReadCount</a></div><div class="ttdeci">int getDesiredAsyncReadCount(std::uint32_t seq) override</div><div class="ttdoc">Get the maximum number of async reads the node store prefers.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00114">DatabaseNodeImp.h:114</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a43f4e702f8a28e14e0bbe08e1b6c6aa5"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a43f4e702f8a28e14e0bbe08e1b6c6aa5">ripple::NodeStore::DatabaseNodeImp::pCache_</a></div><div class="ttdeci">std::shared_ptr&lt; TaggedCache&lt; uint256, NodeObject &gt; &gt; pCache_</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00136">DatabaseNodeImp.h:136</a></div></div>
<div class="ttc" id="anamespaceripple_1_1NodeStore_html_a41cef3aa8ed33b8fa1b438ed7b6d1287"><div class="ttname"><a href="namespaceripple_1_1NodeStore.html#a41cef3aa8ed33b8fa1b438ed7b6d1287">ripple::NodeStore::cacheTargetAge</a></div><div class="ttdeci">constexpr std::chrono::seconds cacheTargetAge</div><div class="ttdef"><b>Definition:</b> <a href="nodestore_2impl_2Tuning_8h_source.html#l00036">nodestore/impl/Tuning.h:36</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_aeb5a2f3b5e526ef3a0ac87b7653e828b"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#aeb5a2f3b5e526ef3a0ac87b7653e828b">ripple::NodeStore::DatabaseNodeImp::DatabaseNodeImp</a></div><div class="ttdeci">DatabaseNodeImp()=delete</div></div>
<div class="ttc" id="aclassbeast_1_1Journal_html"><div class="ttname"><a href="classbeast_1_1Journal.html">beast::Journal</a></div><div class="ttdoc">A generic endpoint for log messages.</div><div class="ttdef"><b>Definition:</b> <a href="Journal_8h_source.html#l00060">Journal.h:60</a></div></div>
<div class="ttc" id="aclassbeast_1_1Journal_html"><div class="ttname"><a href="classbeast_1_1Journal.html">beast::Journal</a></div><div class="ttdoc">A generic endpoint for log messages.</div><div class="ttdef"><b>Definition:</b> <a href="Journal_8h_source.html#l00058">Journal.h:58</a></div></div>
<div class="ttc" id="ainteger_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Scheduler_html"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Scheduler.html">ripple::NodeStore::Scheduler</a></div><div class="ttdoc">Scheduling for asynchronous backend activity.</div><div class="ttdef"><b>Definition:</b> <a href="ripple_2nodestore_2Scheduler_8h_source.html#l00057">ripple/nodestore/Scheduler.h:57</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_ae264a5c85e4339eebb71bc2f8477516a"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#ae264a5c85e4339eebb71bc2f8477516a">ripple::NodeStore::DatabaseNodeImp::operator=</a></div><div class="ttdeci">DatabaseNodeImp &amp; operator=(DatabaseNodeImp const &amp;)=delete</div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a109754c4bed6627ba778fa84244177a4"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a109754c4bed6627ba778fa84244177a4">ripple::NodeStore::Database::fetchInternal</a></div><div class="ttdeci">std::shared_ptr&lt; NodeObject &gt; fetchInternal(uint256 const &amp;hash, std::shared_ptr&lt; Backend &gt; backend)</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00123">Database.cpp:123</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_ab1c2b150933ce2628c9457ac4ab87402"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#ab1c2b150933ce2628c9457ac4ab87402">ripple::NodeStore::DatabaseNodeImp::asyncFetch</a></div><div class="ttdeci">bool asyncFetch(uint256 const &amp;hash, std::uint32_t seq, std::shared_ptr&lt; NodeObject &gt; &amp;object) override</div><div class="ttdoc">Fetch an object without waiting.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8cpp_source.html#l00039">DatabaseNodeImp.cpp:39</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a8c8554053c68cd10c47edf735bcda7ad"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a8c8554053c68cd10c47edf735bcda7ad">ripple::NodeStore::DatabaseNodeImp::nCache_</a></div><div class="ttdeci">std::shared_ptr&lt; KeyCache&lt; uint256 &gt; &gt; nCache_</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00123">DatabaseNodeImp.h:123</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_ab1c2b150933ce2628c9457ac4ab87402"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#ab1c2b150933ce2628c9457ac4ab87402">ripple::NodeStore::DatabaseNodeImp::asyncFetch</a></div><div class="ttdeci">bool asyncFetch(uint256 const &amp;hash, std::uint32_t seq, std::shared_ptr&lt; NodeObject &gt; &amp;object) override</div><div class="ttdoc">Fetch an object without waiting.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8cpp_source.html#l00042">DatabaseNodeImp.cpp:42</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a8c8554053c68cd10c47edf735bcda7ad"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a8c8554053c68cd10c47edf735bcda7ad">ripple::NodeStore::DatabaseNodeImp::nCache_</a></div><div class="ttdeci">std::shared_ptr&lt; KeyCache&lt; uint256 &gt; &gt; nCache_</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00139">DatabaseNodeImp.h:139</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_1NodeStore_1_1Database_html_aad7aa12d0cc01006120761d23312d428"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#aad7aa12d0cc01006120761d23312d428">ripple::NodeStore::Database::storeLedger</a></div><div class="ttdeci">virtual bool storeLedger(std::shared_ptr&lt; Ledger const &gt; const &amp;srcLedger)=0</div><div class="ttdoc">Copies a ledger stored in a different database to this one.</div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a727c96f7f30d04345184be123dfe1137"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a727c96f7f30d04345184be123dfe1137">ripple::NodeStore::DatabaseNodeImp::storeLedger</a></div><div class="ttdeci">bool storeLedger(std::shared_ptr&lt; Ledger const &gt; const &amp;srcLedger) override</div><div class="ttdoc">Copies a ledger stored in a different database to this one.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00094">DatabaseNodeImp.h:94</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_af83b106a8e0f80ef92cc3140e1112ec0"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#af83b106a8e0f80ef92cc3140e1112ec0">ripple::NodeStore::DatabaseNodeImp::sweep</a></div><div class="ttdeci">void sweep() override</div><div class="ttdoc">Remove expired entries from the positive and negative caches.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8cpp_source.html#l00061">DatabaseNodeImp.cpp:61</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_ab8f5eeb95d1166af47301d041b3063f2"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#ab8f5eeb95d1166af47301d041b3063f2">ripple::NodeStore::Database::stopThreads</a></div><div class="ttdeci">void stopThreads()</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00095">Database.cpp:95</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a727c96f7f30d04345184be123dfe1137"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a727c96f7f30d04345184be123dfe1137">ripple::NodeStore::DatabaseNodeImp::storeLedger</a></div><div class="ttdeci">bool storeLedger(std::shared_ptr&lt; Ledger const &gt; const &amp;srcLedger) override</div><div class="ttdoc">Copies a ledger stored in a different database to this one.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00107">DatabaseNodeImp.h:107</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_af83b106a8e0f80ef92cc3140e1112ec0"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#af83b106a8e0f80ef92cc3140e1112ec0">ripple::NodeStore::DatabaseNodeImp::sweep</a></div><div class="ttdeci">void sweep() override</div><div class="ttdoc">Remove expired entries from the positive and negative caches.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8cpp_source.html#l00066">DatabaseNodeImp.cpp:66</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_ab8f5eeb95d1166af47301d041b3063f2"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#ab8f5eeb95d1166af47301d041b3063f2">ripple::NodeStore::Database::stopThreads</a></div><div class="ttdeci">void stopThreads()</div><div class="ttdef"><b>Definition:</b> <a href="Database_8cpp_source.html#l00093">Database.cpp:93</a></div></div>
<div class="ttc" id="anamespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdoc">STL namespace.</div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_af1d350946ec4cb8b65fd6796727d47b0"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#af1d350946ec4cb8b65fd6796727d47b0">ripple::NodeStore::DatabaseNodeImp::fetch</a></div><div class="ttdeci">std::shared_ptr&lt; NodeObject &gt; fetch(uint256 const &amp;hash, std::uint32_t seq) override</div><div class="ttdoc">Fetch an object.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00084">DatabaseNodeImp.h:84</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeObject_html"><div class="ttname"><a href="classripple_1_1NodeObject.html">ripple::NodeObject</a></div><div class="ttdoc">A simple object that the Ledger uses to store entries.</div><div class="ttdef"><b>Definition:</b> <a href="NodeObject_8h_source.html#l00050">NodeObject.h:50</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a4c17cdf34e0eafb2907eab36b242cadb"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a4c17cdf34e0eafb2907eab36b242cadb">ripple::NodeStore::DatabaseNodeImp::DatabaseNodeImp</a></div><div class="ttdeci">DatabaseNodeImp(std::string const &amp;name, Scheduler &amp;scheduler, int readThreads, Stoppable &amp;parent, std::shared_ptr&lt; Backend &gt; backend, Section const &amp;config, beast::Journal j)</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00036">DatabaseNodeImp.h:36</a></div></div>
<div class="ttc" id="aclassripple_1_1KeyCache_html"><div class="ttname"><a href="classripple_1_1KeyCache.html">ripple::KeyCache</a></div><div class="ttdoc">Maintains a cache of keys with no associated data.</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00044">KeyCache.h:44</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a2fb3e575c65dfb865877a15b7a365763"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2fb3e575c65dfb865877a15b7a365763">ripple::NodeStore::DatabaseNodeImp::getName</a></div><div class="ttdeci">std::string getName() const override</div><div class="ttdoc">Retrieve the name associated with this backend.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00062">DatabaseNodeImp.h:62</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a1d43ea3b85274618e9278a6bc4f0e417"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a1d43ea3b85274618e9278a6bc4f0e417">ripple::NodeStore::DatabaseNodeImp::~DatabaseNodeImp</a></div><div class="ttdeci">~DatabaseNodeImp() override</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00055">DatabaseNodeImp.h:55</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_af1d350946ec4cb8b65fd6796727d47b0"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#af1d350946ec4cb8b65fd6796727d47b0">ripple::NodeStore::DatabaseNodeImp::fetch</a></div><div class="ttdeci">std::shared_ptr&lt; NodeObject &gt; fetch(uint256 const &amp;hash, std::uint32_t seq) override</div><div class="ttdoc">Fetch an object.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00095">DatabaseNodeImp.h:95</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeObject_html"><div class="ttname"><a href="classripple_1_1NodeObject.html">ripple::NodeObject</a></div><div class="ttdoc">A simple object that the Ledger uses to store entries.</div><div class="ttdef"><b>Definition:</b> <a href="NodeObject_8h_source.html#l00048">NodeObject.h:48</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a4c17cdf34e0eafb2907eab36b242cadb"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a4c17cdf34e0eafb2907eab36b242cadb">ripple::NodeStore::DatabaseNodeImp::DatabaseNodeImp</a></div><div class="ttdeci">DatabaseNodeImp(std::string const &amp;name, Scheduler &amp;scheduler, int readThreads, Stoppable &amp;parent, std::shared_ptr&lt; Backend &gt; backend, Section const &amp;config, beast::Journal j)</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00037">DatabaseNodeImp.h:37</a></div></div>
<div class="ttc" id="aclassripple_1_1KeyCache_html"><div class="ttname"><a href="classripple_1_1KeyCache.html">ripple::KeyCache</a></div><div class="ttdoc">Maintains a cache of keys with no associated data.</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00043">KeyCache.h:43</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a2fb3e575c65dfb865877a15b7a365763"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a2fb3e575c65dfb865877a15b7a365763">ripple::NodeStore::DatabaseNodeImp::getName</a></div><div class="ttdeci">std::string getName() const override</div><div class="ttdoc">Retrieve the name associated with this backend.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00070">DatabaseNodeImp.h:70</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseNodeImp_html_a1d43ea3b85274618e9278a6bc4f0e417"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseNodeImp.html#a1d43ea3b85274618e9278a6bc4f0e417">ripple::NodeStore::DatabaseNodeImp::~DatabaseNodeImp</a></div><div class="ttdeci">~DatabaseNodeImp() override</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseNodeImp_8h_source.html#l00063">DatabaseNodeImp.h:63</a></div></div>
<div class="ttc" id="anamespaceripple_1_1NodeStore_html_ab026118fd22b5e7db14b5dea6938aaa8ac33a634d0db63027973fd6d4ac0b5433"><div class="ttname"><a href="namespaceripple_1_1NodeStore.html#ab026118fd22b5e7db14b5dea6938aaa8ac33a634d0db63027973fd6d4ac0b5433">ripple::NodeStore::asyncDivider</a></div><div class="ttdeci">@ asyncDivider</div><div class="ttdef"><b>Definition:</b> <a href="nodestore_2impl_2Tuning_8h_source.html#l00032">nodestore/impl/Tuning.h:32</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>