blob: b08064b5e2b2fe86e322b9c8c51fd5a6dad66549 [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.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Apache Geode Native C++ Reference: apache::geode::client::CacheTransactionManager 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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</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">Apache Geode Native C++ Reference
&#160;<span id="projectnumber">1.13.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<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>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00387.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- 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 class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">apache::geode::client::CacheTransactionManager Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>An interface for objects who perform transaction management.
<a href="a00387.html#details">More...</a></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:a0981149d55ba268e0599daa32cb373fa"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00387.html#a0981149d55ba268e0599daa32cb373fa">begin</a> ()=0</td></tr>
<tr class="memdesc:a0981149d55ba268e0599daa32cb373fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new transaction and associates it with the current thread. <a href="#a0981149d55ba268e0599daa32cb373fa">More...</a><br /></td></tr>
<tr class="separator:a0981149d55ba268e0599daa32cb373fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf655e511f2fae3bdc6746e2cfa941aa"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00387.html#abf655e511f2fae3bdc6746e2cfa941aa">commit</a> ()=0</td></tr>
<tr class="memdesc:abf655e511f2fae3bdc6746e2cfa941aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Commit the transaction associated with the current thread. <a href="#abf655e511f2fae3bdc6746e2cfa941aa">More...</a><br /></td></tr>
<tr class="separator:abf655e511f2fae3bdc6746e2cfa941aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a262cbb8bb675167abcb99289b8f27529"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00387.html#a262cbb8bb675167abcb99289b8f27529">exists</a> (<a class="el" href="a00871.html">TransactionId</a> &amp;transactionId)=0</td></tr>
<tr class="memdesc:a262cbb8bb675167abcb99289b8f27529"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reports the existence of a transaction for the given transactionId. <a href="#a262cbb8bb675167abcb99289b8f27529">More...</a><br /></td></tr>
<tr class="separator:a262cbb8bb675167abcb99289b8f27529"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5fec7a72fd3778176bc110d3e05f86e"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00387.html#aa5fec7a72fd3778176bc110d3e05f86e">exists</a> ()=0</td></tr>
<tr class="memdesc:aa5fec7a72fd3778176bc110d3e05f86e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reports the existence of a Transaction for this thread. <a href="#aa5fec7a72fd3778176bc110d3e05f86e">More...</a><br /></td></tr>
<tr class="separator:aa5fec7a72fd3778176bc110d3e05f86e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaac9612c9c13933ca31f81ac8a6ca431"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="a00871.html">TransactionId</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00387.html#aaac9612c9c13933ca31f81ac8a6ca431">getTransactionId</a> ()=0</td></tr>
<tr class="memdesc:aaac9612c9c13933ca31f81ac8a6ca431"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the transaction identifier for the current thread. <a href="#aaac9612c9c13933ca31f81ac8a6ca431">More...</a><br /></td></tr>
<tr class="separator:aaac9612c9c13933ca31f81ac8a6ca431"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77a2e4d0bd8a240700f087ed4156cff0"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00387.html#a77a2e4d0bd8a240700f087ed4156cff0">isSuspended</a> (<a class="el" href="a00871.html">TransactionId</a> &amp;transactionId)=0</td></tr>
<tr class="memdesc:a77a2e4d0bd8a240700f087ed4156cff0"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method can be used to determine if a transaction with the given transaction identifier is currently suspended locally. <a href="#a77a2e4d0bd8a240700f087ed4156cff0">More...</a><br /></td></tr>
<tr class="separator:a77a2e4d0bd8a240700f087ed4156cff0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7d47e1b7e4b130af348bd265e33ceee"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00387.html#ad7d47e1b7e4b130af348bd265e33ceee">prepare</a> ()=0</td></tr>
<tr class="memdesc:ad7d47e1b7e4b130af348bd265e33ceee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs prepare during 2 phase commit completion, for the transaction associated with the current thread. <a href="#ad7d47e1b7e4b130af348bd265e33ceee">More...</a><br /></td></tr>
<tr class="separator:ad7d47e1b7e4b130af348bd265e33ceee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadf2e9d5586ff6d59a43876c3aef30ac"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00387.html#aadf2e9d5586ff6d59a43876c3aef30ac">resume</a> (<a class="el" href="a00871.html">TransactionId</a> &amp;transactionId)=0</td></tr>
<tr class="memdesc:aadf2e9d5586ff6d59a43876c3aef30ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">On the current thread, resumes a transaction that was previously suspended using <a class="el" href="a00387.html#a89106519ecfbb7cf0aacf42c2580c446">suspend()</a>. <a href="#aadf2e9d5586ff6d59a43876c3aef30ac">More...</a><br /></td></tr>
<tr class="separator:aadf2e9d5586ff6d59a43876c3aef30ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af52d5c2e1b776ecabde5f3d60f474a49"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00387.html#af52d5c2e1b776ecabde5f3d60f474a49">rollback</a> ()=0</td></tr>
<tr class="memdesc:af52d5c2e1b776ecabde5f3d60f474a49"><td class="mdescLeft">&#160;</td><td class="mdescRight">Roll back the transaction associated with the current thread. <a href="#af52d5c2e1b776ecabde5f3d60f474a49">More...</a><br /></td></tr>
<tr class="separator:af52d5c2e1b776ecabde5f3d60f474a49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89106519ecfbb7cf0aacf42c2580c446"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="a00871.html">TransactionId</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00387.html#a89106519ecfbb7cf0aacf42c2580c446">suspend</a> ()=0</td></tr>
<tr class="memdesc:a89106519ecfbb7cf0aacf42c2580c446"><td class="mdescLeft">&#160;</td><td class="mdescRight">Suspends the transaction on the current thread. <a href="#a89106519ecfbb7cf0aacf42c2580c446">More...</a><br /></td></tr>
<tr class="separator:a89106519ecfbb7cf0aacf42c2580c446"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5b2cdfb8f1cd389690cbd466a1f01c7"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00387.html#ad5b2cdfb8f1cd389690cbd466a1f01c7">tryResume</a> (<a class="el" href="a00871.html">TransactionId</a> &amp;transactionId)=0</td></tr>
<tr class="memdesc:ad5b2cdfb8f1cd389690cbd466a1f01c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">On the current thread, resumes a transaction that was previously suspended using <a class="el" href="a00387.html#a89106519ecfbb7cf0aacf42c2580c446">suspend()</a>. <a href="#ad5b2cdfb8f1cd389690cbd466a1f01c7">More...</a><br /></td></tr>
<tr class="separator:ad5b2cdfb8f1cd389690cbd466a1f01c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbb0a029a4bea5d215b0c3ff588429b7"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00387.html#acbb0a029a4bea5d215b0c3ff588429b7">tryResume</a> (<a class="el" href="a00871.html">TransactionId</a> &amp;transactionId, std::chrono::milliseconds waitTime)=0</td></tr>
<tr class="memdesc:acbb0a029a4bea5d215b0c3ff588429b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">On the current thread, resumes a transaction that was previously suspended using <a class="el" href="a00387.html#a89106519ecfbb7cf0aacf42c2580c446">suspend()</a>, or waits for the specified timeout interval if the transaction has not been suspended. <a href="#acbb0a029a4bea5d215b0c3ff588429b7">More...</a><br /></td></tr>
<tr class="separator:acbb0a029a4bea5d215b0c3ff588429b7"><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>An interface for objects who perform transaction management. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a0981149d55ba268e0599daa32cb373fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0981149d55ba268e0599daa32cb373fa">&#9670;&nbsp;</a></span>begin()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void apache::geode::client::CacheTransactionManager::begin </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></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>Creates a new transaction and associates it with the current thread. </p>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="a00475.html" title="Thrown when the state of cache is manipulated to be illegal.">IllegalStateException</a></td><td>if the thread is already associated with a transaction</td></tr>
</table>
</dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>3.6 </dd></dl>
</div>
</div>
<a id="abf655e511f2fae3bdc6746e2cfa941aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf655e511f2fae3bdc6746e2cfa941aa">&#9670;&nbsp;</a></span>commit()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void apache::geode::client::CacheTransactionManager::commit </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></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>Commit the transaction associated with the current thread. </p>
<p>If the commit operation fails due to a conflict it will destroy the transaction state and throw a {<a class="el" href="a00707.html">}. If the commit operation succeeds, it returns after the transaction state has been merged with committed state. When this method completes, the thread is no longer associated with a transaction. IllegalStateException if the thread is not associated with a transaction CommitConflictException if the commit operation fails due to a write conflict. TransactionDataNodeHasDepartedException if the node hosting the transaction data has departed. This is only relevant for transaction that involve PartitionedRegions. TransactionDataNotColocatedException if at commit time, the data involved in the transaction has moved away from the transaction hosting node. This can only happen if rebalancing/recovery happens during a transaction that involves a PartitionedRegion. TransactionInDoubtException when Geode cannot tell which nodes have applied the transaction and which have not. This only occurs if nodes fail mid-commit, and only then in very rare circumstances. </a></p>
</div>
</div>
<a id="a262cbb8bb675167abcb99289b8f27529"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a262cbb8bb675167abcb99289b8f27529">&#9670;&nbsp;</a></span>exists() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool apache::geode::client::CacheTransactionManager::exists </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00871.html">TransactionId</a> &amp;&#160;</td>
<td class="paramname"><em>transactionId</em></td><td>)</td>
<td></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>Reports the existence of a transaction for the given transactionId. </p>
<p>This method can be used to determine if a transaction with the given transaction identifier is currently in progress locally.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">transactionId</td><td>the given transaction identifier </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the transaction is in progress, false otherwise. </dd></dl>
<dl class="section since"><dt>Since</dt><dd>3.6.2 </dd></dl>
<dl class="section see"><dt>See also</dt><dd>#isSuspended(TransactionId) </dd></dl>
</div>
</div>
<a id="aa5fec7a72fd3778176bc110d3e05f86e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5fec7a72fd3778176bc110d3e05f86e">&#9670;&nbsp;</a></span>exists() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool apache::geode::client::CacheTransactionManager::exists </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></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>Reports the existence of a Transaction for this thread. </p>
<dl class="section return"><dt>Returns</dt><dd>true if a transaction exists, false otherwise</dd></dl>
<dl class="section since"><dt>Since</dt><dd>3.6 </dd></dl>
</div>
</div>
<a id="aaac9612c9c13933ca31f81ac8a6ca431"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaac9612c9c13933ca31f81ac8a6ca431">&#9670;&nbsp;</a></span>getTransactionId()</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="a00871.html">TransactionId</a>&amp; apache::geode::client::CacheTransactionManager::getTransactionId </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></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>Returns the transaction identifier for the current thread. </p>
<dl class="section return"><dt>Returns</dt><dd>the transaction identifier or null if no transaction exists</dd></dl>
<dl class="section since"><dt>Since</dt><dd>3.6.2 </dd></dl>
</div>
</div>
<a id="a77a2e4d0bd8a240700f087ed4156cff0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77a2e4d0bd8a240700f087ed4156cff0">&#9670;&nbsp;</a></span>isSuspended()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool apache::geode::client::CacheTransactionManager::isSuspended </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00871.html">TransactionId</a> &amp;&#160;</td>
<td class="paramname"><em>transactionId</em></td><td>)</td>
<td></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>This method can be used to determine if a transaction with the given transaction identifier is currently suspended locally. </p>
<p>This method does not check other members for transaction status.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">transactionId</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the transaction is in suspended state, false otherwise </dd></dl>
<dl class="section since"><dt>Since</dt><dd>3.6.2 </dd></dl>
<dl class="section see"><dt>See also</dt><dd>#exists(TransactionId) </dd></dl>
</div>
</div>
<a id="ad7d47e1b7e4b130af348bd265e33ceee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7d47e1b7e4b130af348bd265e33ceee">&#9670;&nbsp;</a></span>prepare()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void apache::geode::client::CacheTransactionManager::prepare </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></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>Performs prepare during 2 phase commit completion, for the transaction associated with the current thread. </p>
<p>Locks of the entries modified in the current transaction on the server side. If the prepare operation fails due to a conflict it will destroy the transaction state and throw a <a class="el" href="a00707.html">CommitConflictException</a>. If the prepare operation succeeds, transaction state is set to prepared state. When this method completes, the thread is still associated with a transaction, and is waiting on commit or rollback operation.</p>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="a00475.html" title="Thrown when the state of cache is manipulated to be illegal.">IllegalStateException</a></td><td>if the thread is not associated with a transaction</td></tr>
<tr><td class="paramname"><a class="el" href="a00707.html" title="Thrown when a commit fails due to a write conflict.">CommitConflictException</a></td><td>if the commit operation fails due to a write conflict.</td></tr>
<tr><td class="paramname"><a class="el" href="a00711.html" title="Thrown when the transactional data host has shutdown or no longer has the data being modified by the ...">TransactionDataNodeHasDepartedException</a></td><td>if the node hosting the transaction data has departed. This is only relevant for transaction that involve PartitionedRegions.</td></tr>
<tr><td class="paramname">TransactionDataNotColocatedException</td><td>if at commit time, the data involved in the transaction has moved away from the transaction hosting node. This can only happen if rebalancing/recovery happens during a transaction that involves a PartitionedRegion.</td></tr>
<tr><td class="paramname">TransactionInDoubtException</td><td>when Geode cannot tell which nodes have applied the transaction and which have not. This only occurs if nodes fail mid-commit, and only then in very rare circumstances. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aadf2e9d5586ff6d59a43876c3aef30ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadf2e9d5586ff6d59a43876c3aef30ac">&#9670;&nbsp;</a></span>resume()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void apache::geode::client::CacheTransactionManager::resume </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00871.html">TransactionId</a> &amp;&#160;</td>
<td class="paramname"><em>transactionId</em></td><td>)</td>
<td></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>On the current thread, resumes a transaction that was previously suspended using <a class="el" href="a00387.html#a89106519ecfbb7cf0aacf42c2580c446">suspend()</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">transactionId</td><td>the transaction to resume </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="a00475.html" title="Thrown when the state of cache is manipulated to be illegal.">IllegalStateException</a></td><td>if the thread is associated with a transaction or if <a class="el" href="">isSuspended(TransactionId)</a> would return false for the given transactionId </td></tr>
</table>
</dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>3.6.2 </dd></dl>
</div>
</div>
<a id="af52d5c2e1b776ecabde5f3d60f474a49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af52d5c2e1b776ecabde5f3d60f474a49">&#9670;&nbsp;</a></span>rollback()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void apache::geode::client::CacheTransactionManager::rollback </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></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>Roll back the transaction associated with the current thread. </p>
<p>When this method completes, the thread is no longer associated with a transaction and the transaction context is destroyed.</p>
<dl class="section since"><dt>Since</dt><dd>3.6</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="a00475.html" title="Thrown when the state of cache is manipulated to be illegal.">IllegalStateException</a></td><td>if the thread is not associated with a transaction </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a89106519ecfbb7cf0aacf42c2580c446"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89106519ecfbb7cf0aacf42c2580c446">&#9670;&nbsp;</a></span>suspend()</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="a00871.html">TransactionId</a>&amp; apache::geode::client::CacheTransactionManager::suspend </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></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>Suspends the transaction on the current thread. </p>
<p>All subsequent operations performed by this thread will be non-transactional. The suspended transaction can be resumed by calling <a class="el" href="">resume(TransactionId)</a></p>
<dl class="section return"><dt>Returns</dt><dd>the transaction identifier of the suspended transaction or null if the thread was not associated with a transaction </dd></dl>
<dl class="section since"><dt>Since</dt><dd>3.6.2 </dd></dl>
</div>
</div>
<a id="ad5b2cdfb8f1cd389690cbd466a1f01c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5b2cdfb8f1cd389690cbd466a1f01c7">&#9670;&nbsp;</a></span>tryResume() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool apache::geode::client::CacheTransactionManager::tryResume </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00871.html">TransactionId</a> &amp;&#160;</td>
<td class="paramname"><em>transactionId</em></td><td>)</td>
<td></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>On the current thread, resumes a transaction that was previously suspended using <a class="el" href="a00387.html#a89106519ecfbb7cf0aacf42c2580c446">suspend()</a>. </p>
<p>This method is equivalent to </p><pre>
if (isSuspended(txId)) {
resume(txId);
}
</pre><p> except that this action is performed atomically</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">transactionId</td><td>the transaction to resume </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the transaction was resumed, false otherwise </dd></dl>
<dl class="section since"><dt>Since</dt><dd>3.6.2 </dd></dl>
</div>
</div>
<a id="acbb0a029a4bea5d215b0c3ff588429b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbb0a029a4bea5d215b0c3ff588429b7">&#9670;&nbsp;</a></span>tryResume() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool apache::geode::client::CacheTransactionManager::tryResume </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00871.html">TransactionId</a> &amp;&#160;</td>
<td class="paramname"><em>transactionId</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::chrono::milliseconds&#160;</td>
<td class="paramname"><em>waitTime</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></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>On the current thread, resumes a transaction that was previously suspended using <a class="el" href="a00387.html#a89106519ecfbb7cf0aacf42c2580c446">suspend()</a>, or waits for the specified timeout interval if the transaction has not been suspended. </p>
<p>This method will return if: </p><ul>
<li>
Another thread suspends the transaction </li>
<li>
Another thread calls commit/rollback on the transaction </li>
<li>
This thread has waited for the specified timeout </li>
</ul>
<p>This method returns immediately if <a class="el" href="">exists(TransactionId)</a> returns false.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">transactionId</td><td>the transaction to resume </td></tr>
<tr><td class="paramname">waitTime</td><td>the maximum time to wait </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the transaction was resumed, false otherwise </dd></dl>
<dl class="section since"><dt>Since</dt><dd>3.6.2 </dd></dl>
<dl class="section see"><dt>See also</dt><dd>#tryResume(TransactionId) </dd></dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<HR><address style="align: right;"><small>Apache Geode C++ Cache API Documentation</small></address>