1<!--$Id: memp_sync.so,v 10.43 2007/02/27 19:23:07 bostic Exp $--> 2<!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> 3<!--See the file LICENSE for redistribution information.--> 4<html> 5<head> 6<title>Berkeley DB: DbEnv::memp_sync</title> 7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> 8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> 9</head> 10<body bgcolor=white> 11<table width="100%"><tr valign=top> 12<td> 13<b>DbEnv::memp_sync</b> 14</td> 15<td align=right> 16<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a> 17<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td> 18</tr></table> 19<hr size=1 noshade> 20<tt> 21<b><pre> 22#include <db_cxx.h> 23<p> 24int 25DbEnv::memp_sync(DbLsn *lsn); 26</pre></b> 27<hr size=1 noshade> 28<b>Description: DbEnv::memp_sync</b> 29<p>The DbEnv::memp_sync method flushes modified pages in the cache to their 30backing files.</p> 31<p>Pages in the pool that cannot be immediately written back to disk (for 32example, pages that are currently in use by another thread of control) 33are waited for and written to disk as soon as it is possible to do 34so.</p> 35<p>The DbEnv::memp_sync method 36either returns a non-zero error value 37or throws an exception that encapsulates a non-zero error value on 38failure, and returns 0 on success. 39</p> 40<b>Parameters</b> <br> 41 <b>lsn</b><ul compact><li>The purpose of the <b>lsn</b> parameter is to enable a transaction 42manager to ensure, as part of a checkpoint, that all pages modified by 43a certain time have been written to disk. 44<p>All modified pages with a a log sequence number (<a href="../api_cxx/lsn_class.html">DbLsn</a>) less 45than the <b>lsn</b> parameter are written to disk. If <b>lsn</b> is 46NULL, all modified pages in the pool are written to disk.</p></ul> 47<br> 48<hr size=1 noshade> 49<br><b>Class</b> 50<a href="../api_cxx/env_class.html">DbEnv</a>, <a href="../api_cxx/mempfile_class.html">DbMpoolFile</a> 51<br><b>See Also</b> 52<a href="../api_cxx/memp_list.html">Memory Pools and Related Methods</a> 53</tt> 54<table width="100%"><tr><td><br></td><td align=right> 55<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a> 56</td></tr></table> 57<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 58</body> 59</html> 60