mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 21:15:58 +00:00
628 lines
38 KiB
HTML
628 lines
38 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>rippled: ripple::ETLLoadBalancer 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&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="namespaceripple.html">ripple</a></li><li class="navelem"><a class="el" href="classripple_1_1ETLLoadBalancer.html">ETLLoadBalancer</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pri-methods">Private Member Functions</a> |
|
|
<a href="#pri-attribs">Private Attributes</a> |
|
|
<a href="classripple_1_1ETLLoadBalancer-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">ripple::ETLLoadBalancer Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>This class is used to manage connections to transaction processing processes This class spawns a listener for each etl source, which listens to messages on the ledgers stream (to keep track of which ledgers have been validated by the network, and the range of ledgers each etl source has).
|
|
<a href="classripple_1_1ETLLoadBalancer.html#details">More...</a></p>
|
|
<div class="dynheader">
|
|
Collaboration diagram for ripple::ETLLoadBalancer:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="classripple_1_1ETLLoadBalancer__coll__graph.png" border="0" usemap="#ripple_1_1ETLLoadBalancer_coll__map" alt="Collaboration graph"/></div>
|
|
<map name="ripple_1_1ETLLoadBalancer_coll__map" id="ripple_1_1ETLLoadBalancer_coll__map">
|
|
<area shape="rect" title="This class is used to manage connections to transaction processing processes This class spawns a list..." alt="" coords="1165,705,1343,731"/>
|
|
<area shape="rect" href="classripple_1_1ReportingETL.html" title="This class is responsible for continuously extracting data from a p2p node, and writing that data to ..." alt="" coords="1622,603,1774,630"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/container/vector.html" title=" " alt="" coords="2487,727,2691,768"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html" title=" " alt="" coords="2203,584,2373,625"/>
|
|
<area shape="rect" href="classripple_1_1ETLSource.html" title="This class manages a connection to a single ETL source." alt="" coords="1997,485,2132,511"/>
|
|
<area shape="rect" href="classripple_1_1Application.html" title=" " alt="" coords="1184,179,1324,206"/>
|
|
<area shape="rect" href="classbeast_1_1PropertyStream_1_1Source.html" title="Subclasses can be called to write to a stream and have children." alt="" coords="869,137,1037,179"/>
|
|
<area shape="rect" href="classbeast_1_1PropertyStream_1_1Item.html" title=" " alt="" coords="1170,113,1338,155"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/thread/recursive_mutex.html" title="STL class." alt="" coords="576,162,735,189"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/string/basic_string.html" title="STL class." alt="" coords="612,231,699,258"/>
|
|
<area shape="rect" href="classbeast_1_1List.html" title=" " alt="" coords="563,96,748,137"/>
|
|
<area shape="rect" href="classbeast_1_1detail_1_1ListNode.html" title=" " alt="" coords="275,51,457,107"/>
|
|
<area shape="rect" href="classbeast_1_1detail_1_1ListNode.html" title=" " alt="" coords="5,59,173,100"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/types/size_t.html" title=" " alt="" coords="322,131,410,158"/>
|
|
<area shape="rect" title=" " alt="" coords="880,213,1027,239"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/thread/mutex.html" title="STL class." alt="" coords="907,910,999,937"/>
|
|
<area shape="rect" href="classripple_1_1NetworkValidatedLedgers.html" title="This datastructure is used to keep track of the sequence of the most recent ledger validated by the n..." alt="" coords="1163,903,1345,944"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/atomic/atomic.html" title=" " alt="" coords="1189,454,1319,481"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html" title=" " alt="" coords="1584,654,1812,710"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/container/vector.html" title=" " alt="" coords="1607,337,1789,379"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/utility/pair.html" title=" " alt="" coords="1181,337,1327,379"/>
|
|
<area shape="rect" title=" " alt="" coords="934,345,973,371"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html" title=" " alt="" coords="1571,115,1825,171"/>
|
|
<area shape="rect" href="classbeast_1_1Journal.html" title="A generic endpoint for log messages." alt="" coords="898,586,1009,613"/>
|
|
<area shape="rect" href="classbeast_1_1Journal_1_1Sink.html" title="Abstraction for the underlying message destination." alt="" coords="582,586,729,613"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/thread/condition_variable.html" title=" " alt="" coords="868,1005,1039,1031"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/utility/optional.html" title=" " alt="" coords="860,795,1047,822"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/chrono/time_point.html" title=" " alt="" coords="1168,505,1340,561"/>
|
|
<area shape="rect" href="http://en.cppreference.com/w/cpp/thread/thread.html" title="STL class." alt="" coords="1208,647,1300,674"/>
|
|
</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:a7ed6afdb7764e68b565d52e6e7dc0fb3"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#a7ed6afdb7764e68b565d52e6e7dc0fb3">ETLLoadBalancer</a> (<a class="el" href="classripple_1_1ReportingETL.html">ReportingETL</a> &etl)</td></tr>
|
|
<tr class="separator:a7ed6afdb7764e68b565d52e6e7dc0fb3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a709c6100ed981714c503555335769747"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#a709c6100ed981714c503555335769747">add</a> (<a class="elRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &host, <a class="elRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &websocketPort, <a class="elRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &grpcPort)</td></tr>
|
|
<tr class="memdesc:a709c6100ed981714c503555335769747"><td class="mdescLeft"> </td><td class="mdescRight">Add an ETL source. <a href="classripple_1_1ETLLoadBalancer.html#a709c6100ed981714c503555335769747">More...</a><br /></td></tr>
|
|
<tr class="separator:a709c6100ed981714c503555335769747"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a37175fe335aa3b2266c52dc533bfe748"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#a37175fe335aa3b2266c52dc533bfe748">add</a> (<a class="elRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &host, <a class="elRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &websocketPort)</td></tr>
|
|
<tr class="memdesc:a37175fe335aa3b2266c52dc533bfe748"><td class="mdescLeft"> </td><td class="mdescRight">Add an ETL source without gRPC support. <a href="classripple_1_1ETLLoadBalancer.html#a37175fe335aa3b2266c52dc533bfe748">More...</a><br /></td></tr>
|
|
<tr class="separator:a37175fe335aa3b2266c52dc533bfe748"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa73cdce8089205b3776a3d420a020aab"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#aa73cdce8089205b3776a3d420a020aab">loadInitialLedger</a> (uint32_t sequence, <a class="el" href="classripple_1_1ThreadSafeQueue.html">ThreadSafeQueue</a>< <a class="elRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>< <a class="el" href="namespaceripple.html#abbba3966df1925ac76f6d04c0aa1abe3">SLE</a> >> &writeQueue)</td></tr>
|
|
<tr class="memdesc:aa73cdce8089205b3776a3d420a020aab"><td class="mdescLeft"> </td><td class="mdescRight">Load the initial ledger, writing data to the queue. <a href="classripple_1_1ETLLoadBalancer.html#aa73cdce8089205b3776a3d420a020aab">More...</a><br /></td></tr>
|
|
<tr class="separator:aa73cdce8089205b3776a3d420a020aab"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6996ece057b498bc78b3039cb940fa64"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional</a>< org::xrpl::rpc::v1::GetLedgerResponse > </td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#a6996ece057b498bc78b3039cb940fa64">fetchLedger</a> (uint32_t ledgerSequence, bool getObjects)</td></tr>
|
|
<tr class="memdesc:a6996ece057b498bc78b3039cb940fa64"><td class="mdescLeft"> </td><td class="mdescRight">Fetch data for a specific ledger. <a href="classripple_1_1ETLLoadBalancer.html#a6996ece057b498bc78b3039cb940fa64">More...</a><br /></td></tr>
|
|
<tr class="separator:a6996ece057b498bc78b3039cb940fa64"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad200aaca546601e212a973c0cf374178"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#ad200aaca546601e212a973c0cf374178">start</a> ()</td></tr>
|
|
<tr class="memdesc:ad200aaca546601e212a973c0cf374178"><td class="mdescLeft"> </td><td class="mdescRight">Setup all of the ETL sources and subscribe to the necessary streams. <a href="classripple_1_1ETLLoadBalancer.html#ad200aaca546601e212a973c0cf374178">More...</a><br /></td></tr>
|
|
<tr class="separator:ad200aaca546601e212a973c0cf374178"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:adc3fc877fa56c57d21d8040ad7b247e6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#adc3fc877fa56c57d21d8040ad7b247e6">stop</a> ()</td></tr>
|
|
<tr class="separator:adc3fc877fa56c57d21d8040ad7b247e6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab6df0bc04d07bc79676660e57894cd53"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#ab6df0bc04d07bc79676660e57894cd53">shouldPropagateStream</a> (<a class="el" href="classripple_1_1ETLSource.html">ETLSource</a> *in) const</td></tr>
|
|
<tr class="memdesc:ab6df0bc04d07bc79676660e57894cd53"><td class="mdescLeft"> </td><td class="mdescRight">Determine whether messages received on the transactions_proposed stream should be forwarded to subscribing clients. <a href="classripple_1_1ETLLoadBalancer.html#ab6df0bc04d07bc79676660e57894cd53">More...</a><br /></td></tr>
|
|
<tr class="separator:ab6df0bc04d07bc79676660e57894cd53"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad50b94eccab1d17847b3a3683ff50d0b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classJson_1_1Value.html">Json::Value</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#ad50b94eccab1d17847b3a3683ff50d0b">toJson</a> () const</td></tr>
|
|
<tr class="separator:ad50b94eccab1d17847b3a3683ff50d0b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6215bb2c863dbf41eaa165fe820960f6"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr</a>< org::xrpl::rpc::v1::XRPLedgerAPIService::Stub > </td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#a6215bb2c863dbf41eaa165fe820960f6">getP2pForwardingStub</a> () const</td></tr>
|
|
<tr class="memdesc:a6215bb2c863dbf41eaa165fe820960f6"><td class="mdescLeft"> </td><td class="mdescRight">Randomly select a p2p node to forward a gRPC request to. <a href="classripple_1_1ETLLoadBalancer.html#a6215bb2c863dbf41eaa165fe820960f6">More...</a><br /></td></tr>
|
|
<tr class="separator:a6215bb2c863dbf41eaa165fe820960f6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a81c8eaaeeadf33a98429b4bd70d1e113"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classJson_1_1Value.html">Json::Value</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#a81c8eaaeeadf33a98429b4bd70d1e113">forwardToP2p</a> (<a class="el" href="structripple_1_1RPC_1_1JsonContext.html">RPC::JsonContext</a> &context) const</td></tr>
|
|
<tr class="memdesc:a81c8eaaeeadf33a98429b4bd70d1e113"><td class="mdescLeft"> </td><td class="mdescRight">Forward a JSON <a class="el" href="namespaceripple_1_1RPC.html">RPC</a> request to a randomly selected p2p node. <a href="classripple_1_1ETLLoadBalancer.html#a81c8eaaeeadf33a98429b4bd70d1e113">More...</a><br /></td></tr>
|
|
<tr class="separator:a81c8eaaeeadf33a98429b4bd70d1e113"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
|
|
Private Member Functions</h2></td></tr>
|
|
<tr class="memitem:ac1eb4a94370289cfbd8be75972a2e058"><td class="memTemplParams" colspan="2">template<class Func > </td></tr>
|
|
<tr class="memitem:ac1eb4a94370289cfbd8be75972a2e058"><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#ac1eb4a94370289cfbd8be75972a2e058">execute</a> (Func f, uint32_t ledgerSequence)</td></tr>
|
|
<tr class="memdesc:ac1eb4a94370289cfbd8be75972a2e058"><td class="mdescLeft"> </td><td class="mdescRight">f is a function that takes an <a class="el" href="classripple_1_1ETLSource.html" title="This class manages a connection to a single ETL source.">ETLSource</a> as an argument and returns a bool. <a href="classripple_1_1ETLLoadBalancer.html#ac1eb4a94370289cfbd8be75972a2e058">More...</a><br /></td></tr>
|
|
<tr class="separator:ac1eb4a94370289cfbd8be75972a2e058"><td class="memSeparator" colspan="2"> </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:aadd33fe3ef2505cfc6c3fc084a56f5fb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classripple_1_1ReportingETL.html">ReportingETL</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#aadd33fe3ef2505cfc6c3fc084a56f5fb">etl_</a></td></tr>
|
|
<tr class="separator:aadd33fe3ef2505cfc6c3fc084a56f5fb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afacb633064a09cf5b15837cee322dc9d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbeast_1_1Journal.html">beast::Journal</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#afacb633064a09cf5b15837cee322dc9d">journal_</a></td></tr>
|
|
<tr class="separator:afacb633064a09cf5b15837cee322dc9d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a02c02034712eaab2aa25d229a4aed8f6"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a>< <a class="elRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr</a>< <a class="el" href="classripple_1_1ETLSource.html">ETLSource</a> > > </td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1ETLLoadBalancer.html#a02c02034712eaab2aa25d229a4aed8f6">sources_</a></td></tr>
|
|
<tr class="separator:a02c02034712eaab2aa25d229a4aed8f6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>This class is used to manage connections to transaction processing processes This class spawns a listener for each etl source, which listens to messages on the ledgers stream (to keep track of which ledgers have been validated by the network, and the range of ledgers each etl source has). </p>
|
|
<p>This class also allows requests for ledger data to be load balanced across all possible etl sources. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="ETLSource_8h_source.html#l00315">315</a> of file <a class="el" href="ETLSource_8h_source.html">ETLSource.h</a>.</p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="a7ed6afdb7764e68b565d52e6e7dc0fb3"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7ed6afdb7764e68b565d52e6e7dc0fb3">◆ </a></span>ETLLoadBalancer()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ripple::ETLLoadBalancer::ETLLoadBalancer </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classripple_1_1ReportingETL.html">ReportingETL</a> & </td>
|
|
<td class="paramname"><em>etl</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="ETLSource_8cpp_source.html#l00650">650</a> of file <a class="el" href="ETLSource_8cpp_source.html">ETLSource.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a709c6100ed981714c503555335769747"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a709c6100ed981714c503555335769747">◆ </a></span>add() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void ripple::ETLLoadBalancer::add </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> & </td>
|
|
<td class="paramname"><em>host</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> & </td>
|
|
<td class="paramname"><em>websocketPort</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> & </td>
|
|
<td class="paramname"><em>grpcPort</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Add an ETL source. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">host</td><td>host or ip of ETL source </td></tr>
|
|
<tr><td class="paramname">websocketPort</td><td>port where ETL source accepts websocket connections </td></tr>
|
|
<tr><td class="paramname">grpcPort</td><td>port where ETL source accepts gRPC requests </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="ETLSource_8cpp_source.html#l00657">657</a> of file <a class="el" href="ETLSource_8cpp_source.html">ETLSource.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a37175fe335aa3b2266c52dc533bfe748"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a37175fe335aa3b2266c52dc533bfe748">◆ </a></span>add() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void ripple::ETLLoadBalancer::add </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> & </td>
|
|
<td class="paramname"><em>host</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> & </td>
|
|
<td class="paramname"><em>websocketPort</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Add an ETL source without gRPC support. </p>
|
|
<p>This source will send messages on the ledgers and transactions_proposed streams, but will not be able to handle the gRPC requests that are used for ETL </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">host</td><td>host or ip of ETL source </td></tr>
|
|
<tr><td class="paramname">websocketPort</td><td>port where ETL source accepts websocket connections </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="ETLSource_8cpp_source.html#l00670">670</a> of file <a class="el" href="ETLSource_8cpp_source.html">ETLSource.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa73cdce8089205b3776a3d420a020aab"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa73cdce8089205b3776a3d420a020aab">◆ </a></span>loadInitialLedger()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void ripple::ETLLoadBalancer::loadInitialLedger </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>sequence</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="classripple_1_1ThreadSafeQueue.html">ThreadSafeQueue</a>< <a class="elRef" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a>< <a class="el" href="namespaceripple.html#abbba3966df1925ac76f6d04c0aa1abe3">SLE</a> >> & </td>
|
|
<td class="paramname"><em>writeQueue</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Load the initial ledger, writing data to the queue. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">sequence</td><td>sequence of ledger to download </td></tr>
|
|
<tr><td class="paramname">writeQueue</td><td>queue to push downloaded data to </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="ETLSource_8cpp_source.html#l00680">680</a> of file <a class="el" href="ETLSource_8cpp_source.html">ETLSource.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a6996ece057b498bc78b3039cb940fa64"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6996ece057b498bc78b3039cb940fa64">◆ </a></span>fetchLedger()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/utility/optional.html">std::optional</a>< org::xrpl::rpc::v1::GetLedgerResponse > ripple::ETLLoadBalancer::fetchLedger </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>ledgerSequence</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>getObjects</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Fetch data for a specific ledger. </p>
|
|
<p>This function will continuously try to fetch data for the specified ledger until the fetch succeeds, the ledger is found in the database, or the server is shutting down. </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">ledgerSequence</td><td>sequence of ledger to fetch data for </td></tr>
|
|
<tr><td class="paramname">getObjects</td><td>if true, fetch diff between specified ledger and previous </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>the extracted data, if extraction was successful. If the ledger was found in the database or the server is shutting down, the optional will be empty </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="ETLSource_8cpp_source.html#l00699">699</a> of file <a class="el" href="ETLSource_8cpp_source.html">ETLSource.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad200aaca546601e212a973c0cf374178"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad200aaca546601e212a973c0cf374178">◆ </a></span>start()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void ripple::ETLLoadBalancer::start </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Setup all of the ETL sources and subscribe to the necessary streams. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="ETLSource_8cpp_source.html#l00969">969</a> of file <a class="el" href="ETLSource_8cpp_source.html">ETLSource.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="adc3fc877fa56c57d21d8040ad7b247e6"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#adc3fc877fa56c57d21d8040ad7b247e6">◆ </a></span>stop()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void ripple::ETLLoadBalancer::stop </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="ETLSource_8cpp_source.html#l00976">976</a> of file <a class="el" href="ETLSource_8cpp_source.html">ETLSource.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab6df0bc04d07bc79676660e57894cd53"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab6df0bc04d07bc79676660e57894cd53">◆ </a></span>shouldPropagateStream()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool ripple::ETLLoadBalancer::shouldPropagateStream </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classripple_1_1ETLSource.html">ETLSource</a> * </td>
|
|
<td class="paramname"><em>in</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Determine whether messages received on the transactions_proposed stream should be forwarded to subscribing clients. </p>
|
|
<p>The server subscribes to transactions_proposed, validations, and manifests on multiple ETLSources, yet only forwards messages from one source at any given time (to avoid sending duplicate messages to clients). </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">in</td><td><a class="el" href="classripple_1_1ETLSource.html" title="This class manages a connection to a single ETL source.">ETLSource</a> in question </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>true if messages should be forwarded </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="ETLSource_8h_source.html#l00377">377</a> of file <a class="el" href="ETLSource_8h_source.html">ETLSource.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad50b94eccab1d17847b3a3683ff50d0b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad50b94eccab1d17847b3a3683ff50d0b">◆ </a></span>toJson()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classJson_1_1Value.html">Json::Value</a> ripple::ETLLoadBalancer::toJson </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="ETLSource_8h_source.html#l00397">397</a> of file <a class="el" href="ETLSource_8h_source.html">ETLSource.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a6215bb2c863dbf41eaa165fe820960f6"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6215bb2c863dbf41eaa165fe820960f6">◆ </a></span>getP2pForwardingStub()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr</a>< org::xrpl::rpc::v1::XRPLedgerAPIService::Stub > ripple::ETLLoadBalancer::getP2pForwardingStub </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Randomly select a p2p node to forward a gRPC request to. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>gRPC stub to forward requests to p2p node </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="ETLSource_8cpp_source.html#l00733">733</a> of file <a class="el" href="ETLSource_8cpp_source.html">ETLSource.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a81c8eaaeeadf33a98429b4bd70d1e113"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a81c8eaaeeadf33a98429b4bd70d1e113">◆ </a></span>forwardToP2p()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classJson_1_1Value.html">Json::Value</a> ripple::ETLLoadBalancer::forwardToP2p </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="structripple_1_1RPC_1_1JsonContext.html">RPC::JsonContext</a> & </td>
|
|
<td class="paramname"><em>context</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Forward a JSON <a class="el" href="namespaceripple_1_1RPC.html">RPC</a> request to a randomly selected p2p node. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">context</td><td>context of the request </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>response received from p2p node </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="ETLSource_8cpp_source.html#l00755">755</a> of file <a class="el" href="ETLSource_8cpp_source.html">ETLSource.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac1eb4a94370289cfbd8be75972a2e058"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac1eb4a94370289cfbd8be75972a2e058">◆ </a></span>execute()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<div class="memtemplate">
|
|
template<class Func > </div>
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool ripple::ETLLoadBalancer::execute </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Func </td>
|
|
<td class="paramname"><em>f</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">uint32_t </td>
|
|
<td class="paramname"><em>ledgerSequence</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>f is a function that takes an <a class="el" href="classripple_1_1ETLSource.html" title="This class manages a connection to a single ETL source.">ETLSource</a> as an argument and returns a bool. </p>
|
|
<p>Attempt to execute f for one randomly chosen <a class="el" href="classripple_1_1ETLSource.html" title="This class manages a connection to a single ETL source.">ETLSource</a> that has the specified ledger. If f returns false, another randomly chosen <a class="el" href="classripple_1_1ETLSource.html" title="This class manages a connection to a single ETL source.">ETLSource</a> is used. The process repeats until f returns true. </p><dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">f</td><td>function to execute. This function takes the ETL source as an argument, and returns a bool. </td></tr>
|
|
<tr><td class="paramname">ledgerSequence</td><td>f is executed for each <a class="el" href="classripple_1_1ETLSource.html" title="This class manages a connection to a single ETL source.">ETLSource</a> that has this ledger </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>true if f was eventually executed successfully. false if the ledger was found in the database or the server is shutting down </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="ETLSource_8cpp_source.html#l00898">898</a> of file <a class="el" href="ETLSource_8cpp_source.html">ETLSource.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Data Documentation</h2>
|
|
<a id="aadd33fe3ef2505cfc6c3fc084a56f5fb"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aadd33fe3ef2505cfc6c3fc084a56f5fb">◆ </a></span>etl_</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_1ReportingETL.html">ReportingETL</a>& ripple::ETLLoadBalancer::etl_</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="ETLSource_8h_source.html#l00318">318</a> of file <a class="el" href="ETLSource_8h_source.html">ETLSource.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="afacb633064a09cf5b15837cee322dc9d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#afacb633064a09cf5b15837cee322dc9d">◆ </a></span>journal_</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="classbeast_1_1Journal.html">beast::Journal</a> ripple::ETLLoadBalancer::journal_</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="ETLSource_8h_source.html#l00320">320</a> of file <a class="el" href="ETLSource_8h_source.html">ETLSource.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a02c02034712eaab2aa25d229a4aed8f6"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a02c02034712eaab2aa25d229a4aed8f6">◆ </a></span>sources_</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a><<a class="elRef" href="http://en.cppreference.com/w/cpp/memory/unique_ptr.html">std::unique_ptr</a><<a class="el" href="classripple_1_1ETLSource.html">ETLSource</a>> > ripple::ETLLoadBalancer::sources_</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="ETLSource_8h_source.html#l00322">322</a> of file <a class="el" href="ETLSource_8h_source.html">ETLSource.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|