classgrpc_1_1_resource_quota.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.17"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>GRPC C++: grpc::ResourceQuota Class Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">GRPC C++
  25. &#160;<span id="projectnumber">1.36.1</span>
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.17 -->
  34. <script type="text/javascript">
  35. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. /* @license-end */
  38. </script>
  39. <script type="text/javascript" src="menudata.js"></script>
  40. <script type="text/javascript" src="menu.js"></script>
  41. <script type="text/javascript">
  42. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  43. $(function() {
  44. initMenu('',true,false,'search.php','Search');
  45. $(document).ready(function() { init_search(); });
  46. });
  47. /* @license-end */</script>
  48. <div id="main-nav"></div>
  49. <!-- window showing the filter options -->
  50. <div id="MSearchSelectWindow"
  51. onmouseover="return searchBox.OnSearchSelectShow()"
  52. onmouseout="return searchBox.OnSearchSelectHide()"
  53. onkeydown="return searchBox.OnSearchSelectKey(event)">
  54. </div>
  55. <!-- iframe showing the search results (closed by default) -->
  56. <div id="MSearchResultsWindow">
  57. <iframe src="javascript:void(0)" frameborder="0"
  58. name="MSearchResults" id="MSearchResults">
  59. </iframe>
  60. </div>
  61. <div id="nav-path" class="navpath">
  62. <ul>
  63. <li class="navelem"><a class="el" href="namespacegrpc.html">grpc</a></li><li class="navelem"><a class="el" href="classgrpc_1_1_resource_quota.html">ResourceQuota</a></li> </ul>
  64. </div>
  65. </div><!-- top -->
  66. <div class="header">
  67. <div class="summary">
  68. <a href="#pub-methods">Public Member Functions</a> </div>
  69. <div class="headertitle">
  70. <div class="title">grpc::ResourceQuota Class Reference<span class="mlabels"><span class="mlabel">final</span></span></div> </div>
  71. </div><!--header-->
  72. <div class="contents">
  73. <p><a class="el" href="classgrpc_1_1_resource_quota.html" title="ResourceQuota represents a bound on memory and thread usage by the gRPC library.">ResourceQuota</a> represents a bound on memory and thread usage by the gRPC library.
  74. <a href="classgrpc_1_1_resource_quota.html#details">More...</a></p>
  75. <p><code>#include &lt;<a class="el" href="grpcpp_2resource__quota_8h_source.html">resource_quota.h</a>&gt;</code></p>
  76. <table class="memberdecls">
  77. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  78. Public Member Functions</h2></td></tr>
  79. <tr class="memitem:a59884378c08c839b340063953925fdf7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_resource_quota.html#a59884378c08c839b340063953925fdf7">ResourceQuota</a> (const std::string &amp;name)</td></tr>
  80. <tr class="separator:a59884378c08c839b340063953925fdf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:a452006a82860143a83aefaf42ba2fb48"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_resource_quota.html#a452006a82860143a83aefaf42ba2fb48">ResourceQuota</a> ()</td></tr>
  82. <tr class="separator:a452006a82860143a83aefaf42ba2fb48"><td class="memSeparator" colspan="2">&#160;</td></tr>
  83. <tr class="memitem:a96d81328bf6fe9009ac1fa4ba19c7eaa"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_resource_quota.html#a96d81328bf6fe9009ac1fa4ba19c7eaa">~ResourceQuota</a> () override</td></tr>
  84. <tr class="separator:a96d81328bf6fe9009ac1fa4ba19c7eaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  85. <tr class="memitem:a3e9034af4f310baa9bcc11ccfe46170f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgrpc_1_1_resource_quota.html">ResourceQuota</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_resource_quota.html#a3e9034af4f310baa9bcc11ccfe46170f">Resize</a> (size_t new_size)</td></tr>
  86. <tr class="memdesc:a3e9034af4f310baa9bcc11ccfe46170f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resize this <em><a class="el" href="classgrpc_1_1_resource_quota.html" title="ResourceQuota represents a bound on memory and thread usage by the gRPC library.">ResourceQuota</a></em> to a new size. <a href="classgrpc_1_1_resource_quota.html#a3e9034af4f310baa9bcc11ccfe46170f">More...</a><br /></td></tr>
  87. <tr class="separator:a3e9034af4f310baa9bcc11ccfe46170f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  88. <tr class="memitem:ae6845dbf2ca8d94df38c36fff9ac15ca"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgrpc_1_1_resource_quota.html">ResourceQuota</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_resource_quota.html#ae6845dbf2ca8d94df38c36fff9ac15ca">SetMaxThreads</a> (int new_max_threads)</td></tr>
  89. <tr class="memdesc:ae6845dbf2ca8d94df38c36fff9ac15ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the max number of threads that can be allocated from this <a class="el" href="classgrpc_1_1_resource_quota.html" title="ResourceQuota represents a bound on memory and thread usage by the gRPC library.">ResourceQuota</a> object. <a href="classgrpc_1_1_resource_quota.html#ae6845dbf2ca8d94df38c36fff9ac15ca">More...</a><br /></td></tr>
  90. <tr class="separator:ae6845dbf2ca8d94df38c36fff9ac15ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
  91. <tr class="memitem:a1c8f03a21aba636ba5ed2504a0754085"><td class="memItemLeft" align="right" valign="top"><a class="el" href="grpc__types_8h.html#a16d58b8d7c93609d01311b869f4a8d05">grpc_resource_quota</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_resource_quota.html#a1c8f03a21aba636ba5ed2504a0754085">c_resource_quota</a> () const</td></tr>
  92. <tr class="separator:a1c8f03a21aba636ba5ed2504a0754085"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. </table>
  94. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  95. <div class="textblock"><p><a class="el" href="classgrpc_1_1_resource_quota.html" title="ResourceQuota represents a bound on memory and thread usage by the gRPC library.">ResourceQuota</a> represents a bound on memory and thread usage by the gRPC library. </p>
  96. <p>A <a class="el" href="classgrpc_1_1_resource_quota.html" title="ResourceQuota represents a bound on memory and thread usage by the gRPC library.">ResourceQuota</a> can be attached to a server (via <em><a class="el" href="classgrpc_1_1_server_builder.html" title="A builder class for the creation and startup of grpc::Server instances.">ServerBuilder</a></em>), or a client channel (via <em><a class="el" href="classgrpc_1_1_channel_arguments.html" title="Options for channel creation.">ChannelArguments</a></em>). gRPC will attempt to keep memory and threads used by all attached entities below the <a class="el" href="classgrpc_1_1_resource_quota.html" title="ResourceQuota represents a bound on memory and thread usage by the gRPC library.">ResourceQuota</a> bound. </p>
  97. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  98. <a id="a59884378c08c839b340063953925fdf7"></a>
  99. <h2 class="memtitle"><span class="permalink"><a href="#a59884378c08c839b340063953925fdf7">&#9670;&nbsp;</a></span>ResourceQuota() <span class="overload">[1/2]</span></h2>
  100. <div class="memitem">
  101. <div class="memproto">
  102. <table class="mlabels">
  103. <tr>
  104. <td class="mlabels-left">
  105. <table class="memname">
  106. <tr>
  107. <td class="memname">grpc::ResourceQuota::ResourceQuota </td>
  108. <td>(</td>
  109. <td class="paramtype">const std::string &amp;&#160;</td>
  110. <td class="paramname"><em>name</em></td><td>)</td>
  111. <td></td>
  112. </tr>
  113. </table>
  114. </td>
  115. <td class="mlabels-right">
  116. <span class="mlabels"><span class="mlabel">explicit</span></span> </td>
  117. </tr>
  118. </table>
  119. </div><div class="memdoc">
  120. <dl class="params"><dt>Parameters</dt><dd>
  121. <table class="params">
  122. <tr><td class="paramname">name</td><td>- a unique name for this <a class="el" href="classgrpc_1_1_resource_quota.html" title="ResourceQuota represents a bound on memory and thread usage by the gRPC library.">ResourceQuota</a>. </td></tr>
  123. </table>
  124. </dd>
  125. </dl>
  126. </div>
  127. </div>
  128. <a id="a452006a82860143a83aefaf42ba2fb48"></a>
  129. <h2 class="memtitle"><span class="permalink"><a href="#a452006a82860143a83aefaf42ba2fb48">&#9670;&nbsp;</a></span>ResourceQuota() <span class="overload">[2/2]</span></h2>
  130. <div class="memitem">
  131. <div class="memproto">
  132. <table class="memname">
  133. <tr>
  134. <td class="memname">grpc::ResourceQuota::ResourceQuota </td>
  135. <td>(</td>
  136. <td class="paramname"></td><td>)</td>
  137. <td></td>
  138. </tr>
  139. </table>
  140. </div><div class="memdoc">
  141. </div>
  142. </div>
  143. <a id="a96d81328bf6fe9009ac1fa4ba19c7eaa"></a>
  144. <h2 class="memtitle"><span class="permalink"><a href="#a96d81328bf6fe9009ac1fa4ba19c7eaa">&#9670;&nbsp;</a></span>~ResourceQuota()</h2>
  145. <div class="memitem">
  146. <div class="memproto">
  147. <table class="mlabels">
  148. <tr>
  149. <td class="mlabels-left">
  150. <table class="memname">
  151. <tr>
  152. <td class="memname">grpc::ResourceQuota::~ResourceQuota </td>
  153. <td>(</td>
  154. <td class="paramname"></td><td>)</td>
  155. <td></td>
  156. </tr>
  157. </table>
  158. </td>
  159. <td class="mlabels-right">
  160. <span class="mlabels"><span class="mlabel">override</span></span> </td>
  161. </tr>
  162. </table>
  163. </div><div class="memdoc">
  164. </div>
  165. </div>
  166. <h2 class="groupheader">Member Function Documentation</h2>
  167. <a id="a1c8f03a21aba636ba5ed2504a0754085"></a>
  168. <h2 class="memtitle"><span class="permalink"><a href="#a1c8f03a21aba636ba5ed2504a0754085">&#9670;&nbsp;</a></span>c_resource_quota()</h2>
  169. <div class="memitem">
  170. <div class="memproto">
  171. <table class="mlabels">
  172. <tr>
  173. <td class="mlabels-left">
  174. <table class="memname">
  175. <tr>
  176. <td class="memname"><a class="el" href="grpc__types_8h.html#a16d58b8d7c93609d01311b869f4a8d05">grpc_resource_quota</a>* grpc::ResourceQuota::c_resource_quota </td>
  177. <td>(</td>
  178. <td class="paramname"></td><td>)</td>
  179. <td> const</td>
  180. </tr>
  181. </table>
  182. </td>
  183. <td class="mlabels-right">
  184. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  185. </tr>
  186. </table>
  187. </div><div class="memdoc">
  188. </div>
  189. </div>
  190. <a id="a3e9034af4f310baa9bcc11ccfe46170f"></a>
  191. <h2 class="memtitle"><span class="permalink"><a href="#a3e9034af4f310baa9bcc11ccfe46170f">&#9670;&nbsp;</a></span>Resize()</h2>
  192. <div class="memitem">
  193. <div class="memproto">
  194. <table class="memname">
  195. <tr>
  196. <td class="memname"><a class="el" href="classgrpc_1_1_resource_quota.html">ResourceQuota</a>&amp; grpc::ResourceQuota::Resize </td>
  197. <td>(</td>
  198. <td class="paramtype">size_t&#160;</td>
  199. <td class="paramname"><em>new_size</em></td><td>)</td>
  200. <td></td>
  201. </tr>
  202. </table>
  203. </div><div class="memdoc">
  204. <p>Resize this <em><a class="el" href="classgrpc_1_1_resource_quota.html" title="ResourceQuota represents a bound on memory and thread usage by the gRPC library.">ResourceQuota</a></em> to a new size. </p>
  205. <p>If <em>new_size</em> is smaller than the current size of the pool, memory usage will be monotonically decreased until it falls under <em>new_size</em>. No time bound is given for this to occur however. </p>
  206. </div>
  207. </div>
  208. <a id="ae6845dbf2ca8d94df38c36fff9ac15ca"></a>
  209. <h2 class="memtitle"><span class="permalink"><a href="#ae6845dbf2ca8d94df38c36fff9ac15ca">&#9670;&nbsp;</a></span>SetMaxThreads()</h2>
  210. <div class="memitem">
  211. <div class="memproto">
  212. <table class="memname">
  213. <tr>
  214. <td class="memname"><a class="el" href="classgrpc_1_1_resource_quota.html">ResourceQuota</a>&amp; grpc::ResourceQuota::SetMaxThreads </td>
  215. <td>(</td>
  216. <td class="paramtype">int&#160;</td>
  217. <td class="paramname"><em>new_max_threads</em></td><td>)</td>
  218. <td></td>
  219. </tr>
  220. </table>
  221. </div><div class="memdoc">
  222. <p>Set the max number of threads that can be allocated from this <a class="el" href="classgrpc_1_1_resource_quota.html" title="ResourceQuota represents a bound on memory and thread usage by the gRPC library.">ResourceQuota</a> object. </p>
  223. <p>If the new_max_threads value is smaller than the current value, no new threads are allocated until the number of active threads fall below new_max_threads. There is no time bound on when this may happen i.e none of the current threads are forcefully destroyed and all threads run their normal course. </p>
  224. </div>
  225. </div>
  226. <hr/>The documentation for this class was generated from the following file:<ul>
  227. <li>include/grpcpp/<a class="el" href="grpcpp_2resource__quota_8h_source.html">resource_quota.h</a></li>
  228. </ul>
  229. </div><!-- contents -->
  230. <!-- start footer part -->
  231. <hr class="footer"/><address class="footer"><small>
  232. Generated on Wed Mar 3 2021 19:17:24 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
  233. <img class="footer" src="doxygen.png" alt="doxygen"/>
  234. </a> 1.8.17
  235. </small></address>
  236. </body>
  237. </html>