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>Db::get_partition_callback()</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="db.html" title="Chapter��2.�� The Db Handle" /> 11 <link rel="prev" href="dbget_open_flags.html" title="Db::get_open_flags()" /> 12 <link rel="next" href="dbget_partition_dirs.html" title="Db::get_partition_dirs()" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">Db::get_partition_callback()</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="dbget_open_flags.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��2.�� 23 The Db Handle 24 </th> 25 <td width="20%" align="right">��<a accesskey="n" href="dbget_partition_dirs.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="dbget_partition_callback"></a>Db::get_partition_callback()</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">#include <db_cxx.h> 39 40int 41Db::get_partition_callback(u_int32_t *partsp, 42 u_int32_t (**callback_fcn) (DB *dbp, DBT *key);</pre> 43 <p> 44 The <code class="methodname">Db::get_partition_callback()</code> method returns the partitioning information as 45 set by the <a class="xref" href="dbset_partition.html" title="Db::set_partition()">Db::set_partition()</a> method. 46 </p> 47 <p> 48 The <code class="methodname">Db::get_partition_callback()</code> method may be called at any time during the life 49 of the application. 50 </p> 51 <p> 52 The <code class="methodname">Db::get_partition_callback()</code> <span> 53 54 <span> 55 method either returns a non-zero error value or throws an 56 exception that encapsulates a non-zero error value on 57 failure, and returns 0 on success. 58 </span> 59 </span> 60 </p> 61 <div class="sect2" lang="en" xml:lang="en"> 62 <div class="titlepage"> 63 <div> 64 <div> 65 <h3 class="title"><a id="id1637103"></a>Parameters</h3> 66 </div> 67 </div> 68 </div> 69 <div class="sect3" lang="en" xml:lang="en"> 70 <div class="titlepage"> 71 <div> 72 <div> 73 <h4 class="title"><a id="id1637176"></a>partsp</h4> 74 </div> 75 </div> 76 </div> 77 <p> 78 The 79 <code class="methodname">Db::get_partition_callback()</code> 80 method returns number of partitions in the 81 <span class="bold"><strong>partsp</strong></span> 82 parameter. 83 </p> 84 </div> 85 <div class="sect3" lang="en" xml:lang="en"> 86 <div class="titlepage"> 87 <div> 88 <div> 89 <h4 class="title"><a id="id1637121"></a>callback_fcn</h4> 90 </div> 91 </div> 92 </div> 93 <p> 94 The <span class="bold"><strong>callback_fcn</strong></span> parameter will be set to the partitioning function. 95 </p> 96 </div> 97 </div> 98 <div class="sect2" lang="en" xml:lang="en"> 99 <div class="titlepage"> 100 <div> 101 <div> 102 <h3 class="title"><a id="id1637355"></a>Class</h3> 103 </div> 104 </div> 105 </div> 106 <p> 107 <a class="link" href="db.html" title="Chapter��2.�� The Db Handle">Db</a> 108 </p> 109 </div> 110 <div class="sect2" lang="en" xml:lang="en"> 111 <div class="titlepage"> 112 <div> 113 <div> 114 <h3 class="title"><a id="id1637237"></a>See Also</h3> 115 </div> 116 </div> 117 </div> 118 <p> 119 <a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a>, 120 <a class="xref" href="dbset_partition.html" title="Db::set_partition()">Db::set_partition()</a> 121 </p> 122 </div> 123 </div> 124 <div class="navfooter"> 125 <hr /> 126 <table width="100%" summary="Navigation footer"> 127 <tr> 128 <td width="40%" align="left"><a accesskey="p" href="dbget_open_flags.html">Prev</a>��</td> 129 <td width="20%" align="center"> 130 <a accesskey="u" href="db.html">Up</a> 131 </td> 132 <td width="40%" align="right">��<a accesskey="n" href="dbget_partition_dirs.html">Next</a></td> 133 </tr> 134 <tr> 135 <td width="40%" align="left" valign="top">Db::get_open_flags()��</td> 136 <td width="20%" align="center"> 137 <a accesskey="h" href="index.html">Home</a> 138 </td> 139 <td width="40%" align="right" valign="top">��Db::get_partition_dirs()</td> 140 </tr> 141 </table> 142 </div> 143 </body> 144</html> 145