Files
rippled/classripple_1_1NodeStoreScheduler.html
2022-03-31 17:56:44 +00:00

326 lines
21 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>rippled: ripple::NodeStoreScheduler Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">rippled
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceripple.html">ripple</a></li><li class="navelem"><a class="el" href="classripple_1_1NodeStoreScheduler.html">NodeStoreScheduler</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classripple_1_1NodeStoreScheduler-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">ripple::NodeStoreScheduler Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A <a class="el" href="classripple_1_1NodeStore_1_1Scheduler.html" title="Scheduling for asynchronous backend activity.">NodeStore::Scheduler</a> which uses the <a class="el" href="classripple_1_1JobQueue.html" title="A pool of threads to perform work.">JobQueue</a>.
<a href="classripple_1_1NodeStoreScheduler.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for ripple::NodeStoreScheduler:</div>
<div class="dyncontent">
<div class="center"><img src="classripple_1_1NodeStoreScheduler__inherit__graph.png" border="0" usemap="#ripple_1_1NodeStoreScheduler_inherit__map" alt="Inheritance graph"/></div>
<map name="ripple_1_1NodeStoreScheduler_inherit__map" id="ripple_1_1NodeStoreScheduler_inherit__map">
<area shape="rect" title="A NodeStore::Scheduler which uses the JobQueue." alt="" coords="5,95,204,121"/>
<area shape="rect" href="classripple_1_1NodeStore_1_1Scheduler.html" title="Scheduling for asynchronous backend activity." alt="" coords="33,5,176,47"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ripple::NodeStoreScheduler:</div>
<div class="dyncontent">
<div class="center"><img src="classripple_1_1NodeStoreScheduler__coll__graph.png" border="0" usemap="#ripple_1_1NodeStoreScheduler_coll__map" alt="Collaboration graph"/></div>
<map name="ripple_1_1NodeStoreScheduler_coll__map" id="ripple_1_1NodeStoreScheduler_coll__map">
<area shape="rect" title="A NodeStore::Scheduler which uses the JobQueue." alt="" coords="2528,919,2727,945"/>
<area shape="rect" href="classripple_1_1NodeStore_1_1Scheduler.html" title="Scheduling for asynchronous backend activity." alt="" coords="2264,882,2407,923"/>
<area shape="rect" href="classripple_1_1JobQueue.html" title="A pool of threads to perform work." alt="" coords="2271,948,2400,975"/>
<area shape="rect" href="structripple_1_1Workers_1_1Callback.html" title="Called to perform tasks as needed." alt="" coords="1629,5,1813,32"/>
<area shape="rect" href="classripple_1_1Workers.html" title="Workers is effectively a thread pool." alt="" coords="1996,299,2116,325"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/thread/condition_variable.html" title=" " alt="" coords="1226,376,1397,403"/>
<area shape="rect" href="classripple_1_1ClosureCounter.html" title=" " alt="" coords="1637,454,1804,495"/>
<area shape="rect" href="classripple_1_1basic__semaphore.html" title=" " alt="" coords="1619,257,1822,313"/>
<area shape="rect" href="classbeast_1_1insight_1_1Gauge.html" title="A metric for measuring an integral value." alt="" coords="1976,1297,2136,1324"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html" title=" " alt="" coords="1635,1298,1806,1339"/>
<area shape="rect" href="classbeast_1_1insight_1_1GaugeImpl.html" title=" " alt="" coords="1217,1308,1406,1335"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/enable_shared_from_this.html" title=" " alt="" coords="911,1301,1103,1342"/>
<area shape="rect" href="structripple_1_1JobTypeData.html" title=" " alt="" coords="1647,1091,1795,1117"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/container/map.html" title=" " alt="" coords="1982,1113,2130,1154"/>
<area shape="rect" href="classripple_1_1LoadMonitor.html" title=" " alt="" coords="635,1036,781,1063"/>
<area shape="rect" href="classripple_1_1LoadEvent.html" title=" " alt="" coords="939,875,1074,901"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/chrono/duration.html" title=" " alt="" coords="253,1157,437,1184"/>
<area shape="rect" href="classripple_1_1JobTypeInfo.html" title="Holds all the &#39;static&#39; information about a job, which does not change." alt="" coords="935,1077,1078,1104"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/types/integer.html" title=" " alt="" coords="294,956,397,983"/>
<area shape="rect" href="classripple_1_1Job.html" title=" " alt="" coords="1677,824,1764,851"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/thread/mutex.html" title="STL class." alt="" coords="299,452,391,479"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/chrono/time_point.html" title=" " alt="" coords="259,1029,431,1070"/>
<area shape="rect" href="classbeast_1_1Journal.html" title="A generic endpoint for log messages." alt="" coords="290,1217,401,1244"/>
<area shape="rect" href="classbeast_1_1Journal_1_1Sink.html" title="Abstraction for the underlying message destination." alt="" coords="5,1217,152,1244"/>
<area shape="rect" href="classbeast_1_1insight_1_1Event.html" title="A metric for reporting event timing." alt="" coords="1234,1189,1389,1216"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html" title=" " alt="" coords="921,1182,1092,1223"/>
<area shape="rect" href="classbeast_1_1insight_1_1EventImpl.html" title=" " alt="" coords="616,1299,800,1325"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/enable_shared_from_this.html" title=" " alt="" coords="252,1291,439,1333"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/string/basic_string.html" title="STL class." alt="" coords="665,804,751,831"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html" title=" " alt="" coords="1208,1025,1415,1052"/>
<area shape="rect" href="classbeast_1_1insight_1_1Hook.html" title="A reference to a handler for performing polled collection." alt="" coords="1980,1348,2132,1375"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html" title=" " alt="" coords="1635,1363,1806,1405"/>
<area shape="rect" href="classbeast_1_1insight_1_1HookImpl.html" title=" " alt="" coords="1221,1372,1402,1399"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/enable_shared_from_this.html" title=" " alt="" coords="915,1366,1099,1407"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/atomic/atomic.html" title=" " alt="" coords="1991,1399,2121,1425"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/atomic/atomic.html" title=" " alt="" coords="1240,503,1383,529"/>
<area shape="rect" href="classbeast_1_1LockFreeStack.html" title=" " alt="" coords="1613,123,1828,179"/>
<area shape="rect" href="classbeast_1_1LockFreeStack_1_1Node.html" title=" " alt="" coords="917,65,1096,106"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/atomic/atomic.html" title=" " alt="" coords="1216,74,1407,115"/>
<area shape="rect" href="classbeast_1_1LockFreeStack.html" title=" " alt="" coords="1619,57,1823,98"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/types/size_t.html" title=" " alt="" coords="1267,304,1355,331"/>
<area shape="rect" href="classripple_1_1perf_1_1PerfLog.html" title="Singleton class that maintains performance counters and optionally writes Json&#45;formatted data to a di..." alt="" coords="1645,693,1796,720"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/container/set.html" title=" " alt="" coords="1973,848,2139,875"/>
<area shape="rect" href="classripple_1_1CountedObject.html" title=" " alt="" coords="1230,831,1393,873"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/utility/functional/function.html" title=" " alt="" coords="1228,729,1395,756"/>
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html" title=" " alt="" coords="1226,897,1397,938"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a92e3efe8d2011f9095a1e9c76628dc2e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1NodeStoreScheduler.html#a92e3efe8d2011f9095a1e9c76628dc2e">NodeStoreScheduler</a> (<a class="el" href="classripple_1_1JobQueue.html">JobQueue</a> &amp;jobQueue)</td></tr>
<tr class="separator:a92e3efe8d2011f9095a1e9c76628dc2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b1c3260477e401b7e57493b0aaf9a3a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1NodeStoreScheduler.html#a0b1c3260477e401b7e57493b0aaf9a3a">scheduleTask</a> (<a class="el" href="structripple_1_1NodeStore_1_1Task.html">NodeStore::Task</a> &amp;task) override</td></tr>
<tr class="memdesc:a0b1c3260477e401b7e57493b0aaf9a3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Schedules a task. <a href="classripple_1_1NodeStoreScheduler.html#a0b1c3260477e401b7e57493b0aaf9a3a">More...</a><br /></td></tr>
<tr class="separator:a0b1c3260477e401b7e57493b0aaf9a3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a042848ff97f97cff8a602ffec6b9f807"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1NodeStoreScheduler.html#a042848ff97f97cff8a602ffec6b9f807">onFetch</a> (<a class="el" href="structripple_1_1NodeStore_1_1FetchReport.html">NodeStore::FetchReport</a> const &amp;report) override</td></tr>
<tr class="memdesc:a042848ff97f97cff8a602ffec6b9f807"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reports completion of a fetch Allows the scheduler to monitor the node store's performance. <a href="classripple_1_1NodeStoreScheduler.html#a042848ff97f97cff8a602ffec6b9f807">More...</a><br /></td></tr>
<tr class="separator:a042848ff97f97cff8a602ffec6b9f807"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b9464b915021b488e3d2e22b840a62f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1NodeStoreScheduler.html#a0b9464b915021b488e3d2e22b840a62f">onBatchWrite</a> (<a class="el" href="structripple_1_1NodeStore_1_1BatchWriteReport.html">NodeStore::BatchWriteReport</a> const &amp;report) override</td></tr>
<tr class="memdesc:a0b9464b915021b488e3d2e22b840a62f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reports the completion of a batch write Allows the scheduler to monitor the node store's performance. <a href="classripple_1_1NodeStoreScheduler.html#a0b9464b915021b488e3d2e22b840a62f">More...</a><br /></td></tr>
<tr class="separator:a0b9464b915021b488e3d2e22b840a62f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:aa0fbc996243ce5b4d1b5eb2a2cabc2fa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classripple_1_1JobQueue.html">JobQueue</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1NodeStoreScheduler.html#aa0fbc996243ce5b4d1b5eb2a2cabc2fa">jobQueue_</a></td></tr>
<tr class="separator:aa0fbc996243ce5b4d1b5eb2a2cabc2fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A <a class="el" href="classripple_1_1NodeStore_1_1Scheduler.html" title="Scheduling for asynchronous backend activity.">NodeStore::Scheduler</a> which uses the <a class="el" href="classripple_1_1JobQueue.html" title="A pool of threads to perform work.">JobQueue</a>. </p>
<p class="definition">Definition at line <a class="el" href="NodeStoreScheduler_8h_source.html#l00030">30</a> of file <a class="el" href="NodeStoreScheduler_8h_source.html">NodeStoreScheduler.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a92e3efe8d2011f9095a1e9c76628dc2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92e3efe8d2011f9095a1e9c76628dc2e">&#9670;&nbsp;</a></span>NodeStoreScheduler()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ripple::NodeStoreScheduler::NodeStoreScheduler </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classripple_1_1JobQueue.html">JobQueue</a> &amp;&#160;</td>
<td class="paramname"><em>jobQueue</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="NodeStoreScheduler_8cpp_source.html#l00025">25</a> of file <a class="el" href="NodeStoreScheduler_8cpp_source.html">NodeStoreScheduler.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a0b1c3260477e401b7e57493b0aaf9a3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b1c3260477e401b7e57493b0aaf9a3a">&#9670;&nbsp;</a></span>scheduleTask()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ripple::NodeStoreScheduler::scheduleTask </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structripple_1_1NodeStore_1_1Task.html">NodeStore::Task</a> &amp;&#160;</td>
<td class="paramname"><em>task</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Schedules a task. </p>
<p>Depending on the implementation, the task may be invoked either on the current thread of execution, or an unspecified implementation-defined foreign thread. </p>
<p>Implements <a class="el" href="classripple_1_1NodeStore_1_1Scheduler.html#af3734617d65f9903e3b33d3ee6de8102">ripple::NodeStore::Scheduler</a>.</p>
<p class="definition">Definition at line <a class="el" href="NodeStoreScheduler_8cpp_source.html#l00030">30</a> of file <a class="el" href="NodeStoreScheduler_8cpp_source.html">NodeStoreScheduler.cpp</a>.</p>
</div>
</div>
<a id="a042848ff97f97cff8a602ffec6b9f807"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a042848ff97f97cff8a602ffec6b9f807">&#9670;&nbsp;</a></span>onFetch()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ripple::NodeStoreScheduler::onFetch </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structripple_1_1NodeStore_1_1FetchReport.html">NodeStore::FetchReport</a> const &amp;&#160;</td>
<td class="paramname"><em>report</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Reports completion of a fetch Allows the scheduler to monitor the node store's performance. </p>
<p>Implements <a class="el" href="classripple_1_1NodeStore_1_1Scheduler.html#acf9a08ef64dd95c98da3e095ee919171">ripple::NodeStore::Scheduler</a>.</p>
<p class="definition">Definition at line <a class="el" href="NodeStoreScheduler_8cpp_source.html#l00046">46</a> of file <a class="el" href="NodeStoreScheduler_8cpp_source.html">NodeStoreScheduler.cpp</a>.</p>
</div>
</div>
<a id="a0b9464b915021b488e3d2e22b840a62f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b9464b915021b488e3d2e22b840a62f">&#9670;&nbsp;</a></span>onBatchWrite()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ripple::NodeStoreScheduler::onBatchWrite </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structripple_1_1NodeStore_1_1BatchWriteReport.html">NodeStore::BatchWriteReport</a> const &amp;&#160;</td>
<td class="paramname"><em>report</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Reports the completion of a batch write Allows the scheduler to monitor the node store's performance. </p>
<p>Implements <a class="el" href="classripple_1_1NodeStore_1_1Scheduler.html#a0adffe6c4e42f062bd47864f4e615a39">ripple::NodeStore::Scheduler</a>.</p>
<p class="definition">Definition at line <a class="el" href="NodeStoreScheduler_8cpp_source.html#l00059">59</a> of file <a class="el" href="NodeStoreScheduler_8cpp_source.html">NodeStoreScheduler.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="aa0fbc996243ce5b4d1b5eb2a2cabc2fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0fbc996243ce5b4d1b5eb2a2cabc2fa">&#9670;&nbsp;</a></span>jobQueue_</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classripple_1_1JobQueue.html">JobQueue</a>&amp; ripple::NodeStoreScheduler::jobQueue_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="NodeStoreScheduler_8h_source.html#l00043">43</a> of file <a class="el" href="NodeStoreScheduler_8h_source.html">NodeStoreScheduler.h</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>