blob: be308f2557d1c0cd29546e9cf9a2a93ff3d9fa39 [file] [log] [blame]
<!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.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Kudu C++ client API: kudu::client::KuduTransaction::SerializationOptions 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">Kudu C++ client API
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<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','.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: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"><b>kudu</b></li><li class="navelem"><b>client</b></li><li class="navelem"><a class="el" href="classkudu_1_1client_1_1KuduTransaction.html">KuduTransaction</a></li><li class="navelem"><a class="el" href="classkudu_1_1client_1_1KuduTransaction_1_1SerializationOptions.html">SerializationOptions</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classkudu_1_1client_1_1KuduTransaction_1_1SerializationOptions-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">kudu::client::KuduTransaction::SerializationOptions Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="client_8h_source.html">client.h</a>&gt;</code></p>
<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:a7c296a5bb34839e0be7c9191d595f24f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkudu_1_1client_1_1KuduTransaction_1_1SerializationOptions.html#a7c296a5bb34839e0be7c9191d595f24f">keepalive</a> () const</td></tr>
<tr class="separator:a7c296a5bb34839e0be7c9191d595f24f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1349e70e599bb44e47fcfc548c6b9df"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classkudu_1_1client_1_1KuduTransaction_1_1SerializationOptions.html">SerializationOptions</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkudu_1_1client_1_1KuduTransaction_1_1SerializationOptions.html#af1349e70e599bb44e47fcfc548c6b9df">enable_keepalive</a> (bool enable)</td></tr>
<tr class="separator:af1349e70e599bb44e47fcfc548c6b9df"><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>This class controls serialization-related parameters for a Kudu transaction handle (i.e. <code><a class="el" href="classkudu_1_1client_1_1KuduTransaction.html">KuduTransaction</a></code>).</p>
<p>One of the parameters is whether to enable sending keepalive messages for the resulting <code><a class="el" href="classkudu_1_1client_1_1KuduTransaction.html">KuduTransaction</a></code> handle upon deserialization. In future, the list of configurable parameters might be extended (e.g., by adding commit and abort permissions, i.e. whether a handle obtained by deserializing a handle from the string representation can be used to commit and/or abort the transaction). </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="af1349e70e599bb44e47fcfc548c6b9df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1349e70e599bb44e47fcfc548c6b9df">&#9670;&nbsp;</a></span>enable_keepalive()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classkudu_1_1client_1_1KuduTransaction_1_1SerializationOptions.html">SerializationOptions</a>&amp; kudu::client::KuduTransaction::SerializationOptions::enable_keepalive </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>enable</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enable/disable keepalive for a handle which is the result of deserializing a previously serialized <code><a class="el" href="classkudu_1_1client_1_1KuduTransaction.html">KuduTransaction</a></code> handle.</p>
<p>Sending keepalive messages for a transaction handle deserialized from a string is disabled by default.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">enable</td><td>Whether to enable sending keepalive messages for <code><a class="el" href="classkudu_1_1client_1_1KuduTransaction.html">KuduTransaction</a></code> handle once it's deserialized from the string representation of a Kudu transaction handle. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reference to the updated object. </dd></dl>
</div>
</div>
<a id="a7c296a5bb34839e0be7c9191d595f24f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c296a5bb34839e0be7c9191d595f24f">&#9670;&nbsp;</a></span>keepalive()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool kudu::client::KuduTransaction::SerializationOptions::keepalive </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>This method returns the current setting keepalive behavior, i.e. whether to send keepalive messages for Kudu transaction handles.</p>
<p>No keepalive heartbeat messages are sent from a transaction handle if its token was created with the default "keepalive disabled" setting. The idea here is that the most common use case for using transaction tokens is of the "start topology" (see below), so it's enough to have just one top-level handle sending keepalive messages. Overall, having more than one actor sending keepalive messages for a transaction is acceptable but it puts needless load on a cluster.</p>
<p>The most common use case for a transaction's handle serialization/deserialization is of the "star topology": a transaction is started by a top-level application which sends the transaction token produced by serializing the original transaction handle to other worker applications running concurrently, where the latter write their data in the context of the same transaction and report back to the top-level application, which in its turn initiates committing the transaction as needed. The important point is that the top-level application keeps the transaction handle around all the time from the start of the transaction to the very point when transaction is committed. Under the hood, the original transaction handle sends keepalive messages as required until commit phase is initiated, so the deserialized transaction handles which are used by the worker applications don't need to send keepalive messages.</p>
<p>The other (less common) use case is of the "ring topology": a chain of applications work sequentially as a part of the same transaction, where the very first application starts the transaction, writes its data, and hands over the responsibility of managing the lifecycle of the transaction to other application down the chain. After doing so it may exit, so now only the next application has the active transaction handle, and so on it goes until the transaction is committed by the application in the end of the chain. In this scenario, every deserialized handle have to send keepalive messages to avoid automatic rollback of the transaction, and every application in the chain should set <code><a class="el" href="classkudu_1_1client_1_1KuduTransaction_1_1SerializationOptions.html#af1349e70e599bb44e47fcfc548c6b9df">SerializationOptions::enable_keepalive</a></code> to true when serializing its transaction handle into a transaction token to pass to the application next in the chain.</p>
<dl class="section return"><dt>Returns</dt><dd>whether to send keepalive messages for Kudu transaction handles </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/kudu/client/<a class="el" href="client_8h_source.html">client.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/>
<address class="footer">
<small>Generated for Kudu version 1.14.0 on Thu Jan 28 2021 11:11:20 by Doxygen 1.9.1</small>
<br>
<small>Copyright © 2021 The Apache Software Foundation.</small>
</address>
</body>
</html>