| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <link rel="canonical" href="https://ignite.apache.org/releases/2.8.0/cppdoc/transaction_8h_source.html" /> |
| <META NAME="ROBOTS" CONTENT="NOINDEX"> |
| |
| |
| |
| <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.13"/> |
| <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| <title> Apache Ignite C++: transaction.h Source File</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" /> |
| |
| <script> |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
| |
| ga('create', 'UA-61232409-1', 'auto'); |
| ga('send', 'pageview'); |
| |
| </script></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="projectlogo"><img alt="Logo" src="ignite_logo.png"/></td> |
| <td id="projectalign" style="padding-left: 0.5em;"> |
| <div id="projectname"> Apache Ignite C++ |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.13 --> |
| <script type="text/javascript"> |
| var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| </script> |
| <script type="text/javascript" src="menudata.js"></script> |
| <script type="text/javascript" src="menu.js"></script> |
| <script type="text/javascript"> |
| $(function() { |
| initMenu('',true,false,'search.php','Search'); |
| $(document).ready(function() { init_search(); }); |
| }); |
| </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="dir_70c4f2dc9c34c91dd30b464208cd3c8c.html">transactions</a></li> </ul> |
| </div> |
| </div><!-- top --> |
| <div class="header"> |
| <div class="headertitle"> |
| <div class="title">transaction.h</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| <a href="transaction_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * contributor license agreements. See the NOTICE file distributed with</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * this work for additional information regarding copyright ownership.</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * (the "License"); you may not use this file except in compliance with</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * the License. You may obtain a copy of the License at</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> */</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#ifndef _IGNITE_TRANSACTIONS_TRANSACTION</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#define _IGNITE_TRANSACTIONS_TRANSACTION</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <ignite/common/concurrent.h></span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include "ignite/impl/transactions/transaction_impl.h"</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="transaction__consts_8h.html">ignite/transactions/transaction_consts.h</a>"</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">namespace </span><a class="code" href="namespaceignite.html">ignite</a></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> {</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="namespaceignite_1_1transactions.html"> 33</a></span>  <span class="keyword">namespace </span>transactions</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  {</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classignite_1_1transactions_1_1Transaction.html"> 47</a></span>  <span class="keyword">class </span>IGNITE_FRIEND_EXPORT <a class="code" href="classignite_1_1transactions_1_1Transaction.html">Transaction</a></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  {</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keyword">public</span>:</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="code" href="classignite_1_1transactions_1_1Transaction.html">Transaction</a>(common::concurrent::SharedPointer<impl::transactions::TransactionImpl> impl);</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <a class="code" href="classignite_1_1transactions_1_1Transaction.html">Transaction</a>(<span class="keyword">const</span> <a class="code" href="classignite_1_1transactions_1_1Transaction.html">Transaction</a>& other);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <a class="code" href="classignite_1_1transactions_1_1Transaction.html">Transaction</a>& operator=(<span class="keyword">const</span> <a class="code" href="classignite_1_1transactions_1_1Transaction.html">Transaction</a>& other);</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  ~<a class="code" href="classignite_1_1transactions_1_1Transaction.html">Transaction</a>();</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> </div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordtype">void</span> Commit();</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordtype">void</span> Commit(<a class="code" href="classignite_1_1IgniteError.html">IgniteError</a>& err);</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keywordtype">void</span> Rollback();</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordtype">void</span> Rollback(<a class="code" href="classignite_1_1IgniteError.html">IgniteError</a>& err);</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> </div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordtype">void</span> Close();</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span> </div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keywordtype">void</span> Close(<a class="code" href="classignite_1_1IgniteError.html">IgniteError</a>& err);</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span> </div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordtype">void</span> SetRollbackOnly();</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span> </div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="keywordtype">void</span> SetRollbackOnly(<a class="code" href="classignite_1_1IgniteError.html">IgniteError</a>& err);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordtype">bool</span> IsRollbackOnly();</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span> </div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordtype">bool</span> IsRollbackOnly(<a class="code" href="classignite_1_1IgniteError.html">IgniteError</a>& err);</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span> </div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <a class="code" href="structignite_1_1transactions_1_1TransactionState.html#a173faba612c6a4e91c0726140d8d43f3">TransactionState::Type</a> GetState();</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span> </div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <a class="code" href="structignite_1_1transactions_1_1TransactionState.html#a173faba612c6a4e91c0726140d8d43f3">TransactionState::Type</a> GetState(<a class="code" href="classignite_1_1IgniteError.html">IgniteError</a>& err);</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span> </div><div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="classignite_1_1transactions_1_1Transaction.html#af3764b3e1d9a5718dd2a1adc39232d0e"> 226</a></span>  <a class="code" href="structignite_1_1transactions_1_1TransactionConcurrency.html#ae4a4021eb1bbb6d2acdaad1defeb469a">TransactionConcurrency::Type</a> <a class="code" href="classignite_1_1transactions_1_1Transaction.html#af3764b3e1d9a5718dd2a1adc39232d0e">GetConcurrency</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><a class="code" href="structignite_1_1transactions_1_1TransactionConcurrency.html#ae4a4021eb1bbb6d2acdaad1defeb469a">TransactionConcurrency::Type</a><span class="keyword">></span>(impl.Get()->GetConcurrency());</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  }</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span> </div><div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="classignite_1_1transactions_1_1Transaction.html#ae528b6116836bb0659fa72ff5002714d"> 238</a></span>  <a class="code" href="structignite_1_1transactions_1_1TransactionIsolation.html#a3ac24463ce4e1f63186a974c33c6b3e3">TransactionIsolation::Type</a> <a class="code" href="classignite_1_1transactions_1_1Transaction.html#ae528b6116836bb0659fa72ff5002714d">GetIsolation</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><a class="code" href="structignite_1_1transactions_1_1TransactionIsolation.html#a3ac24463ce4e1f63186a974c33c6b3e3">TransactionIsolation::Type</a><span class="keyword">></span>(impl.Get()->GetIsolation());</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  }</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span> </div><div class="line"><a name="l00250"></a><span class="lineno"><a class="line" href="classignite_1_1transactions_1_1Transaction.html#a685130f14959d840e46c64a9aa8d048f"> 250</a></span>  int64_t <a class="code" href="classignite_1_1transactions_1_1Transaction.html#a685130f14959d840e46c64a9aa8d048f">GetTimeout</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="keywordflow">return</span> impl.Get()->GetTimeout();</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  }</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span> </div><div class="line"><a name="l00266"></a><span class="lineno"><a class="line" href="classignite_1_1transactions_1_1Transaction.html#a6f96124829d7926fbf0e5f5e3b0d5da8"> 266</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classignite_1_1transactions_1_1Transaction.html#a6f96124829d7926fbf0e5f5e3b0d5da8">IsValid</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="keywordflow">return</span> impl.IsValid();</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  }</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span> </div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  common::concurrent::SharedPointer<impl::transactions::TransactionImpl> impl;</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  };</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  }</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span> }</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span> </div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span> <span class="preprocessor">#endif //_IGNITE_TRANSACTIONS_TRANSACTION</span></div><div class="ttc" id="structignite_1_1transactions_1_1TransactionState_html_a173faba612c6a4e91c0726140d8d43f3"><div class="ttname"><a href="structignite_1_1transactions_1_1TransactionState.html#a173faba612c6a4e91c0726140d8d43f3">ignite::transactions::TransactionState::Type</a></div><div class="ttdeci">Type</div><div class="ttdef"><b>Definition:</b> transaction_consts.h:120</div></div> |
| <div class="ttc" id="classignite_1_1transactions_1_1Transaction_html_af3764b3e1d9a5718dd2a1adc39232d0e"><div class="ttname"><a href="classignite_1_1transactions_1_1Transaction.html#af3764b3e1d9a5718dd2a1adc39232d0e">ignite::transactions::Transaction::GetConcurrency</a></div><div class="ttdeci">TransactionConcurrency::Type GetConcurrency() const</div><div class="ttdoc">Get concurrency. </div><div class="ttdef"><b>Definition:</b> transaction.h:226</div></div> |
| <div class="ttc" id="classignite_1_1transactions_1_1Transaction_html"><div class="ttname"><a href="classignite_1_1transactions_1_1Transaction.html">ignite::transactions::Transaction</a></div><div class="ttdoc">Ignite cache transaction. </div><div class="ttdef"><b>Definition:</b> transaction.h:47</div></div> |
| <div class="ttc" id="classignite_1_1transactions_1_1Transaction_html_ae528b6116836bb0659fa72ff5002714d"><div class="ttname"><a href="classignite_1_1transactions_1_1Transaction.html#ae528b6116836bb0659fa72ff5002714d">ignite::transactions::Transaction::GetIsolation</a></div><div class="ttdeci">TransactionIsolation::Type GetIsolation() const</div><div class="ttdoc">Get isolation. </div><div class="ttdef"><b>Definition:</b> transaction.h:238</div></div> |
| <div class="ttc" id="classignite_1_1transactions_1_1Transaction_html_a685130f14959d840e46c64a9aa8d048f"><div class="ttname"><a href="classignite_1_1transactions_1_1Transaction.html#a685130f14959d840e46c64a9aa8d048f">ignite::transactions::Transaction::GetTimeout</a></div><div class="ttdeci">int64_t GetTimeout() const</div><div class="ttdoc">Get timeout. </div><div class="ttdef"><b>Definition:</b> transaction.h:250</div></div> |
| <div class="ttc" id="transaction__consts_8h_html"><div class="ttname"><a href="transaction__consts_8h.html">transaction_consts.h</a></div><div class="ttdoc">Declares Transaction-related enumerations. </div></div> |
| <div class="ttc" id="classignite_1_1IgniteError_html"><div class="ttname"><a href="classignite_1_1IgniteError.html">ignite::IgniteError</a></div><div class="ttdoc">Ignite error information. </div><div class="ttdef"><b>Definition:</b> ignite_error.h:94</div></div> |
| <div class="ttc" id="classignite_1_1transactions_1_1Transaction_html_a6f96124829d7926fbf0e5f5e3b0d5da8"><div class="ttname"><a href="classignite_1_1transactions_1_1Transaction.html#a6f96124829d7926fbf0e5f5e3b0d5da8">ignite::transactions::Transaction::IsValid</a></div><div class="ttdeci">bool IsValid() const</div><div class="ttdoc">Check if the instance is valid and can be used. </div><div class="ttdef"><b>Definition:</b> transaction.h:266</div></div> |
| <div class="ttc" id="structignite_1_1transactions_1_1TransactionIsolation_html_a3ac24463ce4e1f63186a974c33c6b3e3"><div class="ttname"><a href="structignite_1_1transactions_1_1TransactionIsolation.html#a3ac24463ce4e1f63186a974c33c6b3e3">ignite::transactions::TransactionIsolation::Type</a></div><div class="ttdeci">Type</div><div class="ttdef"><b>Definition:</b> transaction_consts.h:73</div></div> |
| <div class="ttc" id="namespaceignite_html"><div class="ttname"><a href="namespaceignite.html">ignite</a></div><div class="ttdoc">Apache Ignite API. </div><div class="ttdef"><b>Definition:</b> cache.h:48</div></div> |
| <div class="ttc" id="structignite_1_1transactions_1_1TransactionConcurrency_html_ae4a4021eb1bbb6d2acdaad1defeb469a"><div class="ttname"><a href="structignite_1_1transactions_1_1TransactionConcurrency.html#ae4a4021eb1bbb6d2acdaad1defeb469a">ignite::transactions::TransactionConcurrency::Type</a></div><div class="ttdeci">Type</div><div class="ttdef"><b>Definition:</b> transaction_consts.h:35</div></div> |
| </div><!-- fragment --></div><!-- contents --> |
| <!-- start footer part --> |
| <hr class="footer"/><address class="footer"><small> |
| Generated on Thu Feb 27 2020 14:01:14 for Apache Ignite C++ by  <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/> |
| </a> 1.8.13 |
| </small></address> |
| </body> |
| </html> |