classgrpc__impl_1_1_resource_quota.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.13"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>GRPC C++: grpc_impl::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.23.0</span>
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.13 -->
  34. <script type="text/javascript">
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. </script>
  37. <script type="text/javascript" src="menudata.js"></script>
  38. <script type="text/javascript" src="menu.js"></script>
  39. <script type="text/javascript">
  40. $(function() {
  41. initMenu('',true,false,'search.php','Search');
  42. $(document).ready(function() { init_search(); });
  43. });
  44. </script>
  45. <div id="main-nav"></div>
  46. <!-- window showing the filter options -->
  47. <div id="MSearchSelectWindow"
  48. onmouseover="return searchBox.OnSearchSelectShow()"
  49. onmouseout="return searchBox.OnSearchSelectHide()"
  50. onkeydown="return searchBox.OnSearchSelectKey(event)">
  51. </div>
  52. <!-- iframe showing the search results (closed by default) -->
  53. <div id="MSearchResultsWindow">
  54. <iframe src="javascript:void(0)" frameborder="0"
  55. name="MSearchResults" id="MSearchResults">
  56. </iframe>
  57. </div>
  58. <div id="nav-path" class="navpath">
  59. <ul>
  60. <li class="navelem"><a class="el" href="namespacegrpc__impl.html">grpc_impl</a></li><li class="navelem"><a class="el" href="classgrpc__impl_1_1_resource_quota.html">ResourceQuota</a></li> </ul>
  61. </div>
  62. </div><!-- top -->
  63. <div class="header">
  64. <div class="summary">
  65. <a href="#pub-methods">Public Member Functions</a> </div>
  66. <div class="headertitle">
  67. <div class="title">grpc_impl::ResourceQuota Class Reference<span class="mlabels"><span class="mlabel">final</span></span></div> </div>
  68. </div><!--header-->
  69. <div class="contents">
  70. <p><a class="el" href="classgrpc__impl_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.
  71. <a href="classgrpc__impl_1_1_resource_quota.html#details">More...</a></p>
  72. <p><code>#include &lt;<a class="el" href="resource__quota__impl_8h_source.html">resource_quota_impl.h</a>&gt;</code></p>
  73. <table class="memberdecls">
  74. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  75. Public Member Functions</h2></td></tr>
  76. <tr class="memitem:a33881aaabb7f326cd69e72c7ee109ce4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_resource_quota.html#a33881aaabb7f326cd69e72c7ee109ce4">ResourceQuota</a> (const <a class="el" href="namespacegrpc.html#ab04a87625da3bf85cdaf5e7856b00203">grpc::string</a> &amp;name)</td></tr>
  77. <tr class="separator:a33881aaabb7f326cd69e72c7ee109ce4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:ac29a69b8cd3d4d9e0772c0293a116911"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_resource_quota.html#ac29a69b8cd3d4d9e0772c0293a116911">ResourceQuota</a> ()</td></tr>
  79. <tr class="separator:ac29a69b8cd3d4d9e0772c0293a116911"><td class="memSeparator" colspan="2">&#160;</td></tr>
  80. <tr class="memitem:a99770ab382492a0001fe11c6fa85551d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_resource_quota.html#a99770ab382492a0001fe11c6fa85551d">~ResourceQuota</a> ()</td></tr>
  81. <tr class="separator:a99770ab382492a0001fe11c6fa85551d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  82. <tr class="memitem:a1d8819442c3d0604b2b5287e22a39aa9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgrpc__impl_1_1_resource_quota.html">ResourceQuota</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_resource_quota.html#a1d8819442c3d0604b2b5287e22a39aa9">Resize</a> (size_t new_size)</td></tr>
  83. <tr class="memdesc:a1d8819442c3d0604b2b5287e22a39aa9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resize this <em><a class="el" href="classgrpc__impl_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="#a1d8819442c3d0604b2b5287e22a39aa9">More...</a><br /></td></tr>
  84. <tr class="separator:a1d8819442c3d0604b2b5287e22a39aa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  85. <tr class="memitem:a14df5dcebc19b96eb2936ae443faa99a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgrpc__impl_1_1_resource_quota.html">ResourceQuota</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc__impl_1_1_resource_quota.html#a14df5dcebc19b96eb2936ae443faa99a">SetMaxThreads</a> (int new_max_threads)</td></tr>
  86. <tr class="memdesc:a14df5dcebc19b96eb2936ae443faa99a"><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__impl_1_1_resource_quota.html" title="ResourceQuota represents a bound on memory and thread usage by the gRPC library. ">ResourceQuota</a> object. <a href="#a14df5dcebc19b96eb2936ae443faa99a">More...</a><br /></td></tr>
  87. <tr class="separator:a14df5dcebc19b96eb2936ae443faa99a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  88. <tr class="memitem:aab6549fce38b4157d6facd3b3ff62088"><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__impl_1_1_resource_quota.html#aab6549fce38b4157d6facd3b3ff62088">c_resource_quota</a> () const</td></tr>
  89. <tr class="separator:aab6549fce38b4157d6facd3b3ff62088"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. </table>
  91. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  92. <div class="textblock"><p><a class="el" href="classgrpc__impl_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>
  93. <p>A <a class="el" href="classgrpc__impl_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__impl_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__impl_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__impl_1_1_resource_quota.html" title="ResourceQuota represents a bound on memory and thread usage by the gRPC library. ">ResourceQuota</a> bound. </p>
  94. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  95. <a id="a33881aaabb7f326cd69e72c7ee109ce4"></a>
  96. <h2 class="memtitle"><span class="permalink"><a href="#a33881aaabb7f326cd69e72c7ee109ce4">&#9670;&nbsp;</a></span>ResourceQuota() <span class="overload">[1/2]</span></h2>
  97. <div class="memitem">
  98. <div class="memproto">
  99. <table class="mlabels">
  100. <tr>
  101. <td class="mlabels-left">
  102. <table class="memname">
  103. <tr>
  104. <td class="memname">grpc_impl::ResourceQuota::ResourceQuota </td>
  105. <td>(</td>
  106. <td class="paramtype">const <a class="el" href="namespacegrpc.html#ab04a87625da3bf85cdaf5e7856b00203">grpc::string</a> &amp;&#160;</td>
  107. <td class="paramname"><em>name</em></td><td>)</td>
  108. <td></td>
  109. </tr>
  110. </table>
  111. </td>
  112. <td class="mlabels-right">
  113. <span class="mlabels"><span class="mlabel">explicit</span></span> </td>
  114. </tr>
  115. </table>
  116. </div><div class="memdoc">
  117. <dl class="params"><dt>Parameters</dt><dd>
  118. <table class="params">
  119. <tr><td class="paramname">name</td><td>- a unique name for this <a class="el" href="classgrpc__impl_1_1_resource_quota.html" title="ResourceQuota represents a bound on memory and thread usage by the gRPC library. ">ResourceQuota</a>. </td></tr>
  120. </table>
  121. </dd>
  122. </dl>
  123. </div>
  124. </div>
  125. <a id="ac29a69b8cd3d4d9e0772c0293a116911"></a>
  126. <h2 class="memtitle"><span class="permalink"><a href="#ac29a69b8cd3d4d9e0772c0293a116911">&#9670;&nbsp;</a></span>ResourceQuota() <span class="overload">[2/2]</span></h2>
  127. <div class="memitem">
  128. <div class="memproto">
  129. <table class="memname">
  130. <tr>
  131. <td class="memname">grpc_impl::ResourceQuota::ResourceQuota </td>
  132. <td>(</td>
  133. <td class="paramname"></td><td>)</td>
  134. <td></td>
  135. </tr>
  136. </table>
  137. </div><div class="memdoc">
  138. </div>
  139. </div>
  140. <a id="a99770ab382492a0001fe11c6fa85551d"></a>
  141. <h2 class="memtitle"><span class="permalink"><a href="#a99770ab382492a0001fe11c6fa85551d">&#9670;&nbsp;</a></span>~ResourceQuota()</h2>
  142. <div class="memitem">
  143. <div class="memproto">
  144. <table class="memname">
  145. <tr>
  146. <td class="memname">grpc_impl::ResourceQuota::~ResourceQuota </td>
  147. <td>(</td>
  148. <td class="paramname"></td><td>)</td>
  149. <td></td>
  150. </tr>
  151. </table>
  152. </div><div class="memdoc">
  153. </div>
  154. </div>
  155. <h2 class="groupheader">Member Function Documentation</h2>
  156. <a id="aab6549fce38b4157d6facd3b3ff62088"></a>
  157. <h2 class="memtitle"><span class="permalink"><a href="#aab6549fce38b4157d6facd3b3ff62088">&#9670;&nbsp;</a></span>c_resource_quota()</h2>
  158. <div class="memitem">
  159. <div class="memproto">
  160. <table class="mlabels">
  161. <tr>
  162. <td class="mlabels-left">
  163. <table class="memname">
  164. <tr>
  165. <td class="memname"><a class="el" href="grpc__types_8h.html#a16d58b8d7c93609d01311b869f4a8d05">grpc_resource_quota</a>* grpc_impl::ResourceQuota::c_resource_quota </td>
  166. <td>(</td>
  167. <td class="paramname"></td><td>)</td>
  168. <td> const</td>
  169. </tr>
  170. </table>
  171. </td>
  172. <td class="mlabels-right">
  173. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  174. </tr>
  175. </table>
  176. </div><div class="memdoc">
  177. </div>
  178. </div>
  179. <a id="a1d8819442c3d0604b2b5287e22a39aa9"></a>
  180. <h2 class="memtitle"><span class="permalink"><a href="#a1d8819442c3d0604b2b5287e22a39aa9">&#9670;&nbsp;</a></span>Resize()</h2>
  181. <div class="memitem">
  182. <div class="memproto">
  183. <table class="memname">
  184. <tr>
  185. <td class="memname"><a class="el" href="classgrpc__impl_1_1_resource_quota.html">ResourceQuota</a>&amp; grpc_impl::ResourceQuota::Resize </td>
  186. <td>(</td>
  187. <td class="paramtype">size_t&#160;</td>
  188. <td class="paramname"><em>new_size</em></td><td>)</td>
  189. <td></td>
  190. </tr>
  191. </table>
  192. </div><div class="memdoc">
  193. <p>Resize this <em><a class="el" href="classgrpc__impl_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>
  194. <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>
  195. </div>
  196. </div>
  197. <a id="a14df5dcebc19b96eb2936ae443faa99a"></a>
  198. <h2 class="memtitle"><span class="permalink"><a href="#a14df5dcebc19b96eb2936ae443faa99a">&#9670;&nbsp;</a></span>SetMaxThreads()</h2>
  199. <div class="memitem">
  200. <div class="memproto">
  201. <table class="memname">
  202. <tr>
  203. <td class="memname"><a class="el" href="classgrpc__impl_1_1_resource_quota.html">ResourceQuota</a>&amp; grpc_impl::ResourceQuota::SetMaxThreads </td>
  204. <td>(</td>
  205. <td class="paramtype">int&#160;</td>
  206. <td class="paramname"><em>new_max_threads</em></td><td>)</td>
  207. <td></td>
  208. </tr>
  209. </table>
  210. </div><div class="memdoc">
  211. <p>Set the max number of threads that can be allocated from this <a class="el" href="classgrpc__impl_1_1_resource_quota.html" title="ResourceQuota represents a bound on memory and thread usage by the gRPC library. ">ResourceQuota</a> object. </p>
  212. <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>
  213. </div>
  214. </div>
  215. <hr/>The documentation for this class was generated from the following file:<ul>
  216. <li>include/grpcpp/<a class="el" href="resource__quota__impl_8h_source.html">resource_quota_impl.h</a></li>
  217. </ul>
  218. </div><!-- contents -->
  219. <!-- start footer part -->
  220. <hr class="footer"/><address class="footer"><small>
  221. Generated on Mon Aug 19 2019 12:05:23 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
  222. <img class="footer" src="doxygen.png" alt="doxygen"/>
  223. </a> 1.8.13
  224. </small></address>
  225. </body>
  226. </html>