mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-23 12:35:50 +00:00
181 lines
11 KiB
HTML
181 lines
11 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" lang="en-US">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.9.5"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>rippled: Copy-on-Write Support</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 id="projectrow">
|
|
<td id="projectalign">
|
|
<div id="projectname">rippled
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.5 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<!-- 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">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle"><div class="title">Copy-on-Write Support</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>By nature, a node may appear in multiple <a class="el" href="classripple_1_1SHAMap.html" title="A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.">SHAMap</a> instances.
|
|
<a href="#details">More...</a></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:gac9adec7146a8bea60fe6acf6c1ed98d1"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__SHAMap.html#gac9adec7146a8bea60fe6acf6c1ed98d1">ripple::SHAMapTreeNode::cowid</a> () const</td></tr>
|
|
<tr class="memdesc:gac9adec7146a8bea60fe6acf6c1ed98d1"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <a class="el" href="classripple_1_1SHAMap.html" title="A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.">SHAMap</a> that owns this node. <a href="group__SHAMap.html#gac9adec7146a8bea60fe6acf6c1ed98d1">More...</a><br /></td></tr>
|
|
<tr class="separator:gac9adec7146a8bea60fe6acf6c1ed98d1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga766bfbd4b6d8fdfd9e60ebcd603da6a3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__SHAMap.html#ga766bfbd4b6d8fdfd9e60ebcd603da6a3">ripple::SHAMapTreeNode::unshare</a> ()</td></tr>
|
|
<tr class="memdesc:ga766bfbd4b6d8fdfd9e60ebcd603da6a3"><td class="mdescLeft"> </td><td class="mdescRight">If this node is shared with another map, mark it as no longer shared. <a href="group__SHAMap.html#ga766bfbd4b6d8fdfd9e60ebcd603da6a3">More...</a><br /></td></tr>
|
|
<tr class="separator:ga766bfbd4b6d8fdfd9e60ebcd603da6a3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga9c0a61604e6f1979cfc86366dfc16759"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceripple_1_1intr__ptr.html#a8ea6056dadef473a6c18cd4afbfc2fe6">intr_ptr::SharedPtr</a>< <a class="el" href="classripple_1_1SHAMapTreeNode.html">SHAMapTreeNode</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="group__SHAMap.html#ga9c0a61604e6f1979cfc86366dfc16759">ripple::SHAMapTreeNode::clone</a> (<a class="elRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> <a class="el" href="group__SHAMap.html#gac9adec7146a8bea60fe6acf6c1ed98d1">cowid</a>) const =0</td></tr>
|
|
<tr class="memdesc:ga9c0a61604e6f1979cfc86366dfc16759"><td class="mdescLeft"> </td><td class="mdescRight">Make a copy of this node, setting the owner. <a href="group__SHAMap.html#ga9c0a61604e6f1979cfc86366dfc16759">More...</a><br /></td></tr>
|
|
<tr class="separator:ga9c0a61604e6f1979cfc86366dfc16759"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<p >By nature, a node may appear in multiple <a class="el" href="classripple_1_1SHAMap.html" title="A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.">SHAMap</a> instances. </p>
|
|
<p >Rather than actually duplicating these nodes, <a class="el" href="classripple_1_1SHAMap.html" title="A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.">SHAMap</a> opts to be memory efficient and uses copy-on-write semantics for nodes.</p>
|
|
<p >Only nodes that are not modified and don't need to be flushed back can be shared. Once a node needs to be changed, it must first be copied and the copy must marked as not shareable.</p>
|
|
<p >Note that just because a node may not be <em>owned</em> by a given <a class="el" href="classripple_1_1SHAMap.html" title="A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.">SHAMap</a> instance does not mean that the node is NOT a part of any <a class="el" href="classripple_1_1SHAMap.html" title="A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.">SHAMap</a>. It only means that the node is not owned exclusively by any one <a class="el" href="classripple_1_1SHAMap.html" title="A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.">SHAMap</a>.</p>
|
|
<p >For more on copy-on-write, check out: <a href="https://en.wikipedia.org/wiki/Copy-on-write">https://en.wikipedia.org/wiki/Copy-on-write</a> </p>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="gac9adec7146a8bea60fe6acf6c1ed98d1" name="gac9adec7146a8bea60fe6acf6c1ed98d1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gac9adec7146a8bea60fe6acf6c1ed98d1">◆ </a></span>cowid()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> ripple::SHAMapTreeNode::cowid </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the <a class="el" href="classripple_1_1SHAMap.html" title="A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.">SHAMap</a> that owns this node. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>the ID of the <a class="el" href="classripple_1_1SHAMap.html" title="A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.">SHAMap</a> that owns this node, or 0 if the node is not owned by any <a class="el" href="classripple_1_1SHAMap.html" title="A SHAMap is both a radix tree with a fan-out of 16 and a Merkle tree.">SHAMap</a> and is a candidate for sharing. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="SHAMapTreeNode_8h_source.html#l00118">118</a> of file <a class="el" href="SHAMapTreeNode_8h_source.html">SHAMapTreeNode.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga766bfbd4b6d8fdfd9e60ebcd603da6a3" name="ga766bfbd4b6d8fdfd9e60ebcd603da6a3"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga766bfbd4b6d8fdfd9e60ebcd603da6a3">◆ </a></span>unshare()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void ripple::SHAMapTreeNode::unshare </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>If this node is shared with another map, mark it as no longer shared. </p>
|
|
<p >Only nodes that are not modified and do not need to be flushed back should be marked as unshared. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="SHAMapTreeNode_8h_source.html#l00129">129</a> of file <a class="el" href="SHAMapTreeNode_8h_source.html">SHAMapTreeNode.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga9c0a61604e6f1979cfc86366dfc16759" name="ga9c0a61604e6f1979cfc86366dfc16759"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga9c0a61604e6f1979cfc86366dfc16759">◆ </a></span>clone()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="namespaceripple_1_1intr__ptr.html#a8ea6056dadef473a6c18cd4afbfc2fe6">intr_ptr::SharedPtr</a>< <a class="el" href="classripple_1_1SHAMapTreeNode.html">SHAMapTreeNode</a> > ripple::SHAMapTreeNode::clone </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/types/integer.html">std::uint32_t</a> </td>
|
|
<td class="paramname"><em>cowid</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Make a copy of this node, setting the owner. </p>
|
|
|
|
<p>Implemented in <a class="el" href="classripple_1_1SHAMapAccountStateLeafNode.html#afcfd28df8b77a6a71e3eecbef0d8275c">ripple::SHAMapAccountStateLeafNode</a>, <a class="el" href="classripple_1_1SHAMapTxLeafNode.html#ac5bb5ba6a0536d61898ef9ec45ba2f8a">ripple::SHAMapTxLeafNode</a>, <a class="el" href="classripple_1_1SHAMapInnerNode.html#a3fea06d9513d703111cfba93529ad529">ripple::SHAMapInnerNode</a>, and <a class="el" href="classripple_1_1SHAMapTxPlusMetaLeafNode.html#a219e7c5ee966de64c878eb305cdded0d">ripple::SHAMapTxPlusMetaLeafNode</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
|
|
</small></address>
|
|
</body>
|
|
</html>
|