1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <title>DbMpoolFile::set_pgcookie()</title> 7 <link rel="stylesheet" href="apiReference.css" type="text/css" /> 8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> 9 <link rel="start" href="index.html" title="Berkeley DB C++ API Reference" /> 10 <link rel="up" href="memp.html" title="Chapter��9.�� The DbMpoolFile Handle" /> 11 <link rel="prev" href="mempset_maxsize.html" title="DbMpoolFile::set_maxsize()" /> 12 <link rel="next" href="mempset_priority.html" title="DbMpoolFile::set_priority()" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">DbMpoolFile::set_pgcookie()</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="mempset_maxsize.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��9.�� 23 The DbMpoolFile Handle 24 </th> 25 <td width="20%" align="right">��<a accesskey="n" href="mempset_priority.html">Next</a></td> 26 </tr> 27 </table> 28 <hr /> 29 </div> 30 <div class="sect1" lang="en" xml:lang="en"> 31 <div class="titlepage"> 32 <div> 33 <div> 34 <h2 class="title" style="clear: both"><a id="mempset_pgcookie"></a>DbMpoolFile::set_pgcookie()</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">#include <db_cxx.h> 39 40int 41DbMpoolFile::set_pgcookie(DBT *pgcookie); </pre> 42 <p> 43 The <code class="methodname">DbMpoolFile::set_pgcookie()</code> method specifies a byte string that 44 is provided to the functions registered to do input or output 45 processing of the file's pages as they are read from or written to, 46 the backing filesystem store. (See the 47 <a class="xref" href="mempregister.html" title="DbEnv::memp_register()">DbEnv::memp_register()</a> 48 documentation for more information.) 49 </p> 50 <p> 51 The <code class="methodname">DbMpoolFile::set_pgcookie()</code> method configures a file in the 52 cache, not only operations performed using the specified 53 <a class="link" href="memp.html" title="Chapter��9.�� The DbMpoolFile Handle">DbMpoolFile</a> handle. 54 </p> 55 <p> 56 The <code class="methodname">DbMpoolFile::set_pgcookie()</code> method may not be called after the 57 <a class="xref" href="mempfopen.html" title="DbMpoolFile::open()">DbMpoolFile::open()</a> 58 method is called. If the file is already open in the cache when 59 <a class="xref" href="mempfopen.html" title="DbMpoolFile::open()">DbMpoolFile::open()</a> is 60 called, the information specified to <code class="methodname">DbMpoolFile::set_pgcookie()</code> 61 will replace the existing information. 62 </p> 63 <p> 64 The <code class="methodname">DbMpoolFile::set_pgcookie()</code> <span> 65 66 <span> 67 method either returns a non-zero error value or throws an 68 exception that encapsulates a non-zero error value on 69 failure, and returns 0 on success. 70 </span> 71 </span> 72 </p> 73 <div class="sect2" lang="en" xml:lang="en"> 74 <div class="titlepage"> 75 <div> 76 <div> 77 <h3 class="title"><a id="id1697535"></a>Parameters</h3> 78 </div> 79 </div> 80 </div> 81 <div class="sect3" lang="en" xml:lang="en"> 82 <div class="titlepage"> 83 <div> 84 <div> 85 <h4 class="title"><a id="id1697466"></a>pgcookie</h4> 86 </div> 87 </div> 88 </div> 89 <p> 90 The <span class="bold"><strong>pgcookie</strong></span> parameter is a byte 91 string provided to the functions registered to do input or output 92 processing of the file's pages. 93 </p> 94 </div> 95 </div> 96 <div class="sect2" lang="en" xml:lang="en"> 97 <div class="titlepage"> 98 <div> 99 <div> 100 <h3 class="title"><a id="id1697742"></a>Class</h3> 101 </div> 102 </div> 103 </div> 104 <p> 105 <a class="link" href="env.html" title="Chapter��5.�� The DbEnv Handle">DbEnv</a>, <a class="link" href="memp.html" title="Chapter��9.�� The DbMpoolFile Handle">DbMpoolFile</a> 106 </p> 107 </div> 108 <div class="sect2" lang="en" xml:lang="en"> 109 <div class="titlepage"> 110 <div> 111 <div> 112 <h3 class="title"><a id="id1697686"></a>See Also</h3> 113 </div> 114 </div> 115 </div> 116 <p> 117 <a class="xref" href="memp.html#memplist" title="Memory Pools and Related Methods">Memory Pools and Related Methods</a> 118 </p> 119 </div> 120 </div> 121 <div class="navfooter"> 122 <hr /> 123 <table width="100%" summary="Navigation footer"> 124 <tr> 125 <td width="40%" align="left"><a accesskey="p" href="mempset_maxsize.html">Prev</a>��</td> 126 <td width="20%" align="center"> 127 <a accesskey="u" href="memp.html">Up</a> 128 </td> 129 <td width="40%" align="right">��<a accesskey="n" href="mempset_priority.html">Next</a></td> 130 </tr> 131 <tr> 132 <td width="40%" align="left" valign="top">DbMpoolFile::set_maxsize()��</td> 133 <td width="20%" align="center"> 134 <a accesskey="h" href="index.html">Home</a> 135 </td> 136 <td width="40%" align="right" valign="top">��DbMpoolFile::set_priority()</td> 137 </tr> 138 </table> 139 </div> 140 </body> 141</html> 142