diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-02-17 17:25:57 +0000 |
|---|---|---|
| committer | <> | 2015-03-17 16:26:24 +0000 |
| commit | 780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch) | |
| tree | 598f8b9fa431b228d29897e798de4ac0c1d3d970 /docs/programmer_reference/stl_txn_usage.html | |
| parent | 7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff) | |
| download | berkeleydb-master.tar.gz | |
Diffstat (limited to 'docs/programmer_reference/stl_txn_usage.html')
| -rw-r--r-- | docs/programmer_reference/stl_txn_usage.html | 104 |
1 files changed, 56 insertions, 48 deletions
diff --git a/docs/programmer_reference/stl_txn_usage.html b/docs/programmer_reference/stl_txn_usage.html index 117c20a8..712f4588 100644 --- a/docs/programmer_reference/stl_txn_usage.html +++ b/docs/programmer_reference/stl_txn_usage.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -36,54 +36,60 @@ </div> </div> </div> + <p> + When using transactions with dbstl, you must call the dbstl + transaction functions instead of the corresponding methods + from the Berkeley DB C or C++ transaction API. That is, you + must use <code class="methodname">dbstl::begin_txn()</code>, + <code class="methodname">dbstl::commit_txn()</code> and + <code class="methodname">dbstl::abort_txn()</code> in order to + begin/commit/abort transactions. + </p> + <p> + A container can be configured to use auto commit by setting + the <a href="../api_reference/C/envset_flags.html#envset_flags_DB_AUTO_COMMIT" class="olink">DB_AUTO_COMMIT</a> flag when the environment or database + handle is opened. In this case, any container method that + supports auto commit will automatically form an independent + transaction if the method is not in an external transactional + context; Otherwise, the operation will become part of that + transaction. + </p> <p> - When using transactions with dbstl, you must call the dbstl transaction - functions instead of the corresponding methods from the Berkeley DB C - or C++ transaction API. That is, you must use - <code class="methodname">dbstl::begin_txn()</code>, - <code class="methodname">dbstl::commit_txn()</code> and - <code class="methodname">dbstl::abort_txn()</code> in order to - begin/commit/abort transactions. -</p> + You can configure the flags used internally by dbstl when + it is creating and committing these independent transactions + required by auto commit. To do so, use the + <code class="methodname">db_container::set_txn_begin_flags()</code> + and/or + <code class="methodname">db_container::set_commit_flags()</code> + methods. + </p> + <p> + When a transaction is committed or aborted, dbstl will + automatically close any cursors opened for use by the + transaction. For this reason, any iterators opened within the + transaction context should not be used after the transaction + commits or aborts. + </p> + <p> + You can use nested transactions explicitly and externally, + by calling <code class="methodname">dbstl::begin_txn()</code> in a + context already operating under the protection of a + transaction. But you can not designate which transaction is + the parent transaction. The parent transaction is + automatically the most recently created and unresolved + transaction in current thread. + </p> <p> - A container can be configured to use auto commit by setting the - <a href="../api_reference/C/envset_flags.html#envset_flags_DB_AUTO_COMMIT" class="olink">DB_AUTO_COMMIT</a> flag when the environment or database handle is - opened. In this case, any container method that supports auto commit - will automatically form an independent transaction if the method - is not in an external transactional context; Otherwise, - the operation will become part of that transaction. - -</p> + It is also acceptable to use explicit transactions in a + container configured for auto commit. The operation performed + by the method will become part of the provided external + transaction. + </p> <p> - You can configure the flags used internally by dbstl when it is - creating and committing these independent transactions required by auto - commit. To do so, use the - <code class="methodname">db_container::set_txn_begin_flags()</code> and/or - <code class="methodname">db_container::set_commit_flags()</code> methods. -</p> - <p> - When a transaction is committed or aborted, dbstl will automatically - close any cursors opened for use by the transaction. For this reason, - any iterators opened within the transaction context should not be used - after the transaction commits or aborts. -</p> - <p> - You can use nested transactions explicitly and externally, by calling - <code class="methodname">dbstl::begin_txn()</code> in a context already - operating under the protection of a transaction. But you can not - designate which transaction is the parent transaction. The parent - transaction is automatically the most recently created and unresolved - transaction in current thread. -</p> - <p> - It is also acceptable to use explicit transactions in a container - configured for auto commit. The operation performed by the method will - become part of the provided external transaction. -</p> - <p> - Finally, transactions and iterators cannot be shared among multiple - threads. That is, they are not free-threaded, or thread-safe. -</p> + Finally, transactions and iterators cannot be shared among + multiple threads. That is, they are not free-threaded, or + thread-safe. + </p> </div> <div class="navfooter"> <hr /> @@ -96,11 +102,13 @@ <td width="40%" align="right"> <a accesskey="n" href="stl_mt_usage.html">Next</a></td> </tr> <tr> - <td width="40%" align="left" valign="top">Using advanced Berkeley DB features with dbstl </td> + <td width="40%" align="left" valign="top">Using advanced Berkeley DB + features with dbstl </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> - <td width="40%" align="right" valign="top"> Using dbstl in multithreaded applications</td> + <td width="40%" align="right" valign="top"> Using dbstl in multithreaded + applications</td> </tr> </table> </div> |
