This commit is contained in:
manojsdoshi
2020-06-30 22:25:39 +00:00
parent afa79b0356
commit 76ee98eab2
3262 changed files with 114349 additions and 92216 deletions

View File

@@ -192,7 +192,7 @@ $(function() {
<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; backend-&gt;store(nObj);</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; </div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#a679d869332ca5983aeb5f84e5ad710b2">nCache_</a>-&gt;<a class="code" href="classripple_1_1KeyCache.html#a3bc4a9df6d2a712da022966c6b4f7090">erase</a>(hash);</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#a679d869332ca5983aeb5f84e5ad710b2">nCache_</a>-&gt;erase(hash);</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1Database.html#aa3570fbe5e933011616c7662961de3e5">storeStats</a>(nObj-&gt;getData().size());</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>
@@ -204,7 +204,7 @@ $(function() {
<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="comment">// See if the object is in cache</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordtype">object</span> = <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#ad8ffa795b9c94db42da3548719e3d125">pCache_</a>-&gt;fetch(hash);</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="keywordflow">if</span> (<span class="keywordtype">object</span> || <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#a679d869332ca5983aeb5f84e5ad710b2">nCache_</a>-&gt;<a class="code" href="classripple_1_1KeyCache.html#ad93a1bca0da205d937a9b9781ffab7c9">touch_if_exists</a>(hash))</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="keywordflow">if</span> (<span class="keywordtype">object</span> || <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#a679d869332ca5983aeb5f84e5ad710b2">nCache_</a>-&gt;touch_if_exists(hash))</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>;</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; <span class="comment">// Otherwise post a read</span></div>
@@ -217,15 +217,15 @@ $(function() {
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;{</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#ad8ffa795b9c94db42da3548719e3d125">pCache_</a>-&gt;setTargetSize(size);</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#ad8ffa795b9c94db42da3548719e3d125">pCache_</a>-&gt;setTargetAge(age);</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#a679d869332ca5983aeb5f84e5ad710b2">nCache_</a>-&gt;<a class="code" href="classripple_1_1KeyCache.html#a1c5dbed9b53bcdf3efacce2a3be793cf">setTargetSize</a>(size);</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#a679d869332ca5983aeb5f84e5ad710b2">nCache_</a>-&gt;<a class="code" href="classripple_1_1KeyCache.html#a644f17c49571a93e3d421bc5fc265306">setTargetAge</a>(age);</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#a679d869332ca5983aeb5f84e5ad710b2">nCache_</a>-&gt;setTargetSize(size);</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#a679d869332ca5983aeb5f84e5ad710b2">nCache_</a>-&gt;setTargetAge(age);</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;}</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; </div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#aa67b13515a70659f536b6d1cfeb1c2a2"> 154</a></span>&#160;<a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#aa67b13515a70659f536b6d1cfeb1c2a2">DatabaseRotatingImp::sweep</a>()</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; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#ad8ffa795b9c94db42da3548719e3d125">pCache_</a>-&gt;sweep();</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#a679d869332ca5983aeb5f84e5ad710b2">nCache_</a>-&gt;<a class="code" href="classripple_1_1KeyCache.html#a774eec36bd59b6a346ef7a613734d921">sweep</a>();</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#a679d869332ca5983aeb5f84e5ad710b2">nCache_</a>-&gt;sweep();</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;}</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;<a class="codeRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr&lt;NodeObject&gt;</a></div>
@@ -252,7 +252,7 @@ $(function() {
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; </div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <span class="comment">// Update writable backend with data from the archive backend</span></div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; writable-&gt;store(nObj);</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#a679d869332ca5983aeb5f84e5ad710b2">nCache_</a>-&gt;<a class="code" href="classripple_1_1KeyCache.html#a3bc4a9df6d2a712da022966c6b4f7090">erase</a>(hash);</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <a class="code" href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#a679d869332ca5983aeb5f84e5ad710b2">nCache_</a>-&gt;erase(hash);</div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; }</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; }</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="keywordflow">return</span> nObj;</div>
@@ -285,7 +285,6 @@ $(function() {
<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#l00052">TaggedCache.h:52</a></div></div>
<div class="ttc" id="aclassripple_1_1KeyCache_html_a3bc4a9df6d2a712da022966c6b4f7090"><div class="ttname"><a href="classripple_1_1KeyCache.html#a3bc4a9df6d2a712da022966c6b4f7090">ripple::KeyCache::erase</a></div><div class="ttdeci">bool erase(key_type const &amp;key)</div><div class="ttdoc">Remove the specified cache entry.</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00253">KeyCache.h:253</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseRotatingImp_html_aa67b13515a70659f536b6d1cfeb1c2a2"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#aa67b13515a70659f536b6d1cfeb1c2a2">ripple::NodeStore::DatabaseRotatingImp::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="DatabaseRotatingImp_8cpp_source.html#l00154">DatabaseRotatingImp.cpp:154</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1DatabaseRotatingImp_html_aaf5cdba2bb5e1dde75cfe528bd81a541"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#aaf5cdba2bb5e1dde75cfe528bd81a541">ripple::NodeStore::DatabaseRotatingImp::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="DatabaseRotatingImp_8cpp_source.html#l00145">DatabaseRotatingImp.cpp:145</a></div></div>
<div class="ttc" id="aclassripple_1_1NodeStore_1_1Database_html_a730a87cf8b617a8afb30e2531ede0f81"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a730a87cf8b617a8afb30e2531ede0f81">ripple::NodeStore::Database::fdRequired_</a></div><div class="ttdeci">int fdRequired_</div><div class="ttdef"><b>Definition:</b> <a href="Database_8h_source.html#l00244">Database.h:244</a></div></div>
@@ -300,7 +299,6 @@ $(function() {
<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_1DatabaseRotatingImp_html_a9c3f2d7e8b7e4cca14afe2177c1466b3"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#a9c3f2d7e8b7e4cca14afe2177c1466b3">ripple::NodeStore::DatabaseRotatingImp::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="DatabaseRotatingImp_8cpp_source.html#l00072">DatabaseRotatingImp.cpp:72</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_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 &amp;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_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_1NodeStore_1_1DatabaseRotatingImp_html_a3b006f7535475fd276bc30b77a1b4673"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#a3b006f7535475fd276bc30b77a1b4673">ripple::NodeStore::DatabaseRotatingImp::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="DatabaseRotatingImp_8cpp_source.html#l00079">DatabaseRotatingImp.cpp:79</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>
@@ -314,16 +312,13 @@ $(function() {
<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_1DatabaseRotating_html"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseRotating.html">ripple::NodeStore::DatabaseRotating</a></div><div class="ttdef"><b>Definition:</b> <a href="DatabaseRotating_8h_source.html#l00033">DatabaseRotating.h:33</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_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_1NodeStore_1_1DatabaseRotatingImp_html_ae018381e1b62ed9c61ef8a82d1b3db47"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#ae018381e1b62ed9c61ef8a82d1b3db47">ripple::NodeStore::DatabaseRotatingImp::import</a></div><div class="ttdeci">void import(Database &amp;source) override</div><div class="ttdoc">Import objects from another database.</div><div class="ttdef"><b>Definition:</b> <a href="DatabaseRotatingImp_8cpp_source.html#l00086">DatabaseRotatingImp.cpp:86</a></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_1DatabaseRotatingImp_html_ab0571f6e63778adc6379cb263a6f21f6"><div class="ttname"><a href="classripple_1_1NodeStore_1_1DatabaseRotatingImp.html#ab0571f6e63778adc6379cb263a6f21f6">ripple::NodeStore::DatabaseRotatingImp::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="DatabaseRotatingImp_8cpp_source.html#l00161">DatabaseRotatingImp.cpp: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_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_1KeyCache_html_a1c5dbed9b53bcdf3efacce2a3be793cf"><div class="ttname"><a href="classripple_1_1KeyCache.html#a1c5dbed9b53bcdf3efacce2a3be793cf">ripple::KeyCache::setTargetSize</a></div><div class="ttdeci">void setTargetSize(size_type s)</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00177">KeyCache.h:177</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_1Database_html_a44b4880cc7028c8171c4a901381ba21e"><div class="ttname"><a href="classripple_1_1NodeStore_1_1Database.html#a44b4880cc7028c8171c4a901381ba21e">ripple::NodeStore::Database::asyncFetch</a></div><div class="ttdeci">virtual bool asyncFetch(uint256 const &amp;hash, std::uint32_t seq, std::shared_ptr&lt; NodeObject &gt; &amp;object)=0</div><div class="ttdoc">Fetch an object without waiting.</div></div>
<div class="ttc" id="aclassripple_1_1KeyCache_html_a644f17c49571a93e3d421bc5fc265306"><div class="ttname"><a href="classripple_1_1KeyCache.html#a644f17c49571a93e3d421bc5fc265306">ripple::KeyCache::setTargetAge</a></div><div class="ttdeci">void setTargetAge(std::chrono::seconds s)</div><div class="ttdef"><b>Definition:</b> <a href="KeyCache_8h_source.html#l00184">KeyCache.h:184</a></div></div>
<div class="ttc" id="amake_pair_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/pair/make_pair.html">std::make_pair</a></div><div class="ttdeci">T make_pair(T... args)</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_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>