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/env_faq.html | |
| parent | 7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff) | |
| download | berkeleydb-master.tar.gz | |
Diffstat (limited to 'docs/programmer_reference/env_faq.html')
| -rw-r--r-- | docs/programmer_reference/env_faq.html | 77 |
1 files changed, 42 insertions, 35 deletions
diff --git a/docs/programmer_reference/env_faq.html b/docs/programmer_reference/env_faq.html index 7775c3d3..be1a33aa 100644 --- a/docs/programmer_reference/env_faq.html +++ b/docs/programmer_reference/env_faq.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> @@ -22,9 +22,7 @@ </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="env_remote.html">Prev</a> </td> - <th width="60%" align="center">Chapter 9. - The Berkeley DB Environment - </th> + <th width="60%" align="center">Chapter 9. The Berkeley DB Environment </th> <td width="20%" align="right"> <a accesskey="n" href="cam.html">Next</a></td> </tr> </table> @@ -42,40 +40,50 @@ <ol type="1"> <li> <p> - <span class="bold"><strong>I'm using multiple processes to access an Berkeley DB database - environment; is there any way to ensure that two processes don't run transactional - recovery at the same time, or that all processes have exited the database - environment so that recovery can be run?</strong></span> - </p> + <span class="bold"><strong>I'm using multiple processes to + access an Berkeley DB database environment; is + there any way to ensure that two processes don't + run transactional recovery at the same time, or + that all processes have exited the database + environment so that recovery can be + run?</strong></span> + </p> <p> - See <a class="xref" href="transapp_fail.html" title="Handling failure in Transactional Data Store applications">Handling failure in Transactional Data Store applications</a> and - <a class="xref" href="transapp_app.html" title="Architecting Transactional Data Store applications">Architecting Transactional Data Store applications</a> for a full - discussion of this topic. - </p> + See <a class="xref" href="transapp_fail.html" title="Handling failure in Transactional Data Store applications">Handling failure in Transactional Data Store applications</a> and <a class="xref" href="transapp_app.html" title="Architecting Transactional Data Store applications">Architecting Transactional Data + Store applications</a> for a full + discussion of this topic. + </p> </li> <li> <p> - <span class="bold"><strong>How can I associate application information with a <a href="../api_reference/C/db.html" class="olink">DB</a> or - <a href="../api_reference/C/env.html" class="olink">DB_ENV</a> handle?</strong></span> - </p> + <span class="bold"><strong>How can I associate application + information with a <a href="../api_reference/C/db.html" class="olink">DB</a> or <a href="../api_reference/C/env.html" class="olink">DB_ENV</a> + handle?</strong></span> + </p> <p> - In the C API, the <a href="../api_reference/C/db.html" class="olink">DB</a> and <a href="../api_reference/C/env.html" class="olink">DB_ENV</a> structures each contain an "app_private" field intended - to be used to reference application-specific information. See the <a href="../api_reference/C/dbcreate.html" class="olink">db_create()</a> and - <a href="../api_reference/C/envcreate.html" class="olink">db_env_create()</a> documentation for more information. - </p> + In the C API, the <a href="../api_reference/C/db.html" class="olink">DB</a> and <a href="../api_reference/C/env.html" class="olink">DB_ENV</a> structures each + contain an "app_private" field intended to be used to + reference application-specific information. See the + <a href="../api_reference/C/dbcreate.html" class="olink">db_create()</a> and <a href="../api_reference/C/envcreate.html" class="olink">db_env_create()</a> documentation for more + information. + </p> <p> - In the C++ or Java APIs, the easiest way to associate application-specific data with a - handle is to subclass the <a href="../api_reference/CXX/db.html" class="olink">Db</a> or <a href="../api_reference/CXX/env.html" class="olink">DbEnv</a>, for example subclassing - <a href="../api_reference/CXX/db.html" class="olink">Db</a> to get MyDb. Objects of type MyDb will still have the Berkeley DB API - methods available on them, and you can put any extra data or methods you want into the - MyDb class. If you are using "callback" APIs that take <a href="../api_reference/CXX/db.html" class="olink">Db</a> or - <a href="../api_reference/CXX/env.html" class="olink">DbEnv</a> arguments (for example, - <a href="../api_reference/CXX/dbset_bt_compare.html" class="olink">Db::set_bt_compare()</a>) - these will always be called with the <a href="../api_reference/CXX/db.html" class="olink">Db</a> or <a href="../api_reference/CXX/env.html" class="olink">DbEnv</a> objects you - create. So if you always use MyDb objects, you will be able to take the first argument - to the callback function and cast it to a MyDb (in C++, cast it to (MyDb*)). That will - allow you to access your data members or methods. - </p> + In the C++ or Java APIs, the easiest way to + associate application-specific data with a handle is + to subclass the <a href="../api_reference/CXX/db.html" class="olink">Db</a> or <a href="../api_reference/CXX/env.html" class="olink">DbEnv</a>, for + example subclassing <a href="../api_reference/CXX/db.html" class="olink">Db</a> to get MyDb. + Objects of type MyDb will still have the Berkeley DB + API methods available on them, and you can put any + extra data or methods you want into the MyDb class. If + you are using "callback" APIs that take <a href="../api_reference/CXX/db.html" class="olink">Db</a> + or <a href="../api_reference/CXX/env.html" class="olink">DbEnv</a> arguments (for example, <a href="../api_reference/CXX/dbset_bt_compare.html" class="olink">Db::set_bt_compare()</a>) + these will always be called with the <a href="../api_reference/CXX/db.html" class="olink">Db</a> or <a href="../api_reference/CXX/env.html" class="olink">DbEnv</a> + objects you create. So if you always use MyDb objects, + you will be able to take the first argument to the + callback function and cast it to a MyDb (in C++, cast + it to (MyDb*)). That will allow you to access your + data members or methods. + </p> </li> </ol> </div> @@ -95,9 +103,8 @@ <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> - <td width="40%" align="right" valign="top"> Chapter 10. - Berkeley DB Concurrent Data Store Applications - </td> + <td width="40%" align="right" valign="top"> Chapter 10. Berkeley DB Concurrent Data Store + Applications </td> </tr> </table> </div> |
