http://git-wip-us.apache.org/repos/asf/mesos-site/blob/a3206036/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2io_8hpp.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2io_8hpp.html b/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2io_8hpp.html new file mode 100644 index 0000000..bb8582b --- /dev/null +++ b/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2io_8hpp.html @@ -0,0 +1,114 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.5"/> +<title>Apache Mesos: 3rdparty/libprocess/include/process/io.hpp File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">Apache Mesos + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.5 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li><a href="examples.html"><span>Examples</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_8cab8f464681f7cc51cee77e79a434cd.html">3rdparty</a></li><li class="navelem"><a class="el" href="dir_043a76de98701f9bddf61b5e98f305ff.html">libprocess</a></li><li class="navelem"><a class="el" href="dir_eac18f7a64f6f8afbd1493ef4e09abdb.html">include</a></li><li class="navelem"><a class="el" href="dir_1894286df79cf582d947dbc4268b06cf.html">process</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#namespaces">Namespaces</a> | +<a href="#func-members">Functions</a> | +<a href="#var-members">Variables</a> </div> + <div class="headertitle"> +<div class="title">io.hpp File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <cstring></code><br/> +<code>#include <string></code><br/> +<code>#include <<a class="el" href="future_8hpp_source.html">process/future.hpp</a>></code><br/> +<code>#include <<a class="el" href="nothing_8hpp_source.html">stout/nothing.hpp</a>></code><br/> +</div> +<p><a href="3rdparty_2libprocess_2include_2process_2io_8hpp_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a> +Namespaces</h2></td></tr> +<tr class="memitem:namespaceprocess"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess.html">process</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:namespaceprocess_1_1io"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1io.html">process::io</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:af71c45e0a85e21f6b39060f4e716cebf"><td class="memItemLeft" align="right" valign="top">Future< short > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1io.html#af71c45e0a85e21f6b39060f4e716cebf">process::io::poll</a> (<a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> fd, short events)</td></tr> +<tr class="memdesc:af71c45e0a85e21f6b39060f4e716cebf"><td class="mdescLeft"> </td><td class="mdescRight">Returns the events (a subset of the events specified) that can be performed on the specified file descriptor without blocking. <a href="#af71c45e0a85e21f6b39060f4e716cebf">More...</a><br/></td></tr> +<tr class="separator:af71c45e0a85e21f6b39060f4e716cebf"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a4c34d22e475e29f12ac739921dcc580f"><td class="memItemLeft" align="right" valign="top">Future< size_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1io.html#a4c34d22e475e29f12ac739921dcc580f">process::io::read</a> (<a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> fd, void *data, size_t size)</td></tr> +<tr class="memdesc:a4c34d22e475e29f12ac739921dcc580f"><td class="mdescLeft"> </td><td class="mdescRight">Performs a single non-blocking read by polling on the specified file descriptor until any data can be be read. <a href="#a4c34d22e475e29f12ac739921dcc580f">More...</a><br/></td></tr> +<tr class="separator:a4c34d22e475e29f12ac739921dcc580f"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ad1290a283a4d16068acfef3903bfd88b"><td class="memItemLeft" align="right" valign="top">Future< std::string > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1io.html#ad1290a283a4d16068acfef3903bfd88b">process::io::read</a> (<a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> fd)</td></tr> +<tr class="memdesc:ad1290a283a4d16068acfef3903bfd88b"><td class="mdescLeft"> </td><td class="mdescRight">Performs a series of asynchronous reads, until EOF is reached. <a href="#ad1290a283a4d16068acfef3903bfd88b">More...</a><br/></td></tr> +<tr class="separator:ad1290a283a4d16068acfef3903bfd88b"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a49105dc036ad04225c92bd673da5ce39"><td class="memItemLeft" align="right" valign="top">Future< size_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1io.html#a49105dc036ad04225c92bd673da5ce39">process::io::write</a> (<a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> fd, const void *data, size_t size)</td></tr> +<tr class="memdesc:a49105dc036ad04225c92bd673da5ce39"><td class="mdescLeft"> </td><td class="mdescRight">Performs a single non-blocking write by polling on the specified file descriptor until data can be be written. <a href="#a49105dc036ad04225c92bd673da5ce39">More...</a><br/></td></tr> +<tr class="separator:a49105dc036ad04225c92bd673da5ce39"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a4c2c8de8f0750ab0f0ba40283774dfb6"><td class="memItemLeft" align="right" valign="top">Future< <a class="el" href="structNothing.html">Nothing</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1io.html#a4c2c8de8f0750ab0f0ba40283774dfb6">process::io::write</a> (<a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> fd, const std::string &data)</td></tr> +<tr class="memdesc:a4c2c8de8f0750ab0f0ba40283774dfb6"><td class="mdescLeft"> </td><td class="mdescRight">Performs a series of asynchronous writes, until all of data has been written. <a href="#a4c2c8de8f0750ab0f0ba40283774dfb6">More...</a><br/></td></tr> +<tr class="separator:a4c2c8de8f0750ab0f0ba40283774dfb6"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ab9c4a52a88fcc9983438e391643424ca"><td class="memItemLeft" align="right" valign="top">Future< <a class="el" href="structNothing.html">Nothing</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1io.html#ab9c4a52a88fcc9983438e391643424ca">process::io::redirect</a> (<a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> from, <a class="el" href="classOption.html">Option</a>< <a class="el" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> > to, size_t chunk=4096, const std::vector< lambda::function< void(const std::string &)>> &hooks={})</td></tr> +<tr class="memdesc:ab9c4a52a88fcc9983438e391643424ca"><td class="mdescLeft"> </td><td class="mdescRight">Redirect output from the 'from' file descriptor to the 'to' file descriptor (or /dev/null if 'to' is <a class="el" href="structNone.html">None</a>). <a href="#ab9c4a52a88fcc9983438e391643424ca">More...</a><br/></td></tr> +<tr class="separator:ab9c4a52a88fcc9983438e391643424ca"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a> +Variables</h2></td></tr> +<tr class="memitem:aca1f059ca9f0d7360631c621debeb879"><td class="memItemLeft" align="right" valign="top">const short </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1io.html#aca1f059ca9f0d7360631c621debeb879">process::io::READ</a> = 0x01</td></tr> +<tr class="memdesc:aca1f059ca9f0d7360631c621debeb879"><td class="mdescLeft"> </td><td class="mdescRight">A possible event while polling. <a href="#aca1f059ca9f0d7360631c621debeb879">More...</a><br/></td></tr> +<tr class="separator:aca1f059ca9f0d7360631c621debeb879"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ab005316d71b45c5b05de0a6234c6f8fc"><td class="memItemLeft" align="right" valign="top">const short </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1io.html#ab005316d71b45c5b05de0a6234c6f8fc">process::io::WRITE</a> = 0x02</td></tr> +<tr class="memdesc:ab005316d71b45c5b05de0a6234c6f8fc"><td class="mdescLeft"> </td><td class="mdescRight">A possible event while polling. <a href="#ab005316d71b45c5b05de0a6234c6f8fc">More...</a><br/></td></tr> +<tr class="separator:ab005316d71b45c5b05de0a6234c6f8fc"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a34d62916736c1dfebd1585cf51f19d0c"><td class="memItemLeft" align="right" valign="top">const size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1io.html#a34d62916736c1dfebd1585cf51f19d0c">process::io::BUFFERED_READ_SIZE</a> = 16*4096</td></tr> +<tr class="memdesc:a34d62916736c1dfebd1585cf51f19d0c"><td class="mdescLeft"> </td><td class="mdescRight">Buffered read chunk size. <a href="#a34d62916736c1dfebd1585cf51f19d0c">More...</a><br/></td></tr> +<tr class="separator:a34d62916736c1dfebd1585cf51f19d0c"><td class="memSeparator" colspan="2"> </td></tr> +</table> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.5 +</small></address> +</body> +</html>
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/a3206036/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2io_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2io_8hpp_source.html b/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2io_8hpp_source.html new file mode 100644 index 0000000..a489852 --- /dev/null +++ b/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2io_8hpp_source.html @@ -0,0 +1,137 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.5"/> +<title>Apache Mesos: 3rdparty/libprocess/include/process/io.hpp Source File</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">Apache Mesos + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.5 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li><a href="examples.html"><span>Examples</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_8cab8f464681f7cc51cee77e79a434cd.html">3rdparty</a></li><li class="navelem"><a class="el" href="dir_043a76de98701f9bddf61b5e98f305ff.html">libprocess</a></li><li class="navelem"><a class="el" href="dir_eac18f7a64f6f8afbd1493ef4e09abdb.html">include</a></li><li class="navelem"><a class="el" href="dir_1894286df79cf582d947dbc4268b06cf.html">process</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">io.hpp</div> </div> +</div><!--header--> +<div class="contents"> +<a href="3rdparty_2libprocess_2include_2process_2io_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div> +<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// you may not use this file except in compliance with the License.</span></div> +<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// You may obtain a copy of the License at</span></div> +<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div> +<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div> +<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div> +<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div> +<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div> +<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div> +<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// See the License for the specific language governing permissions and</span></div> +<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// limitations under the License</span></div> +<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div> +<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#ifndef __PROCESS_IO_HPP__</span></div> +<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor"></span><span class="preprocessor">#define __PROCESS_IO_HPP__</span></div> +<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor"></span></div> +<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include <cstring></span> <span class="comment">// For size_t.</span></div> +<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include <string></span></div> +<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div> +<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include <<a class="code" href="future_8hpp.html">process/future.hpp</a>></span></div> +<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> </div> +<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <<a class="code" href="nothing_8hpp.html">stout/nothing.hpp</a>></span></div> +<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#ifdef __WINDOWS__</span></div> +<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor"></span><span class="preprocessor">#include <<a class="code" href="3rdparty_2stout_2include_2stout_2windows_8hpp.html">stout/windows.hpp</a>></span></div> +<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#endif // __WINDOWS__</span></div> +<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor"></span></div> +<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">namespace </span><a class="code" href="namespaceos.html#ae19e4161a51b86a1f330f3bf1dc75389">process</a> {</div> +<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="namespaceprocess_1_1io.html"> 27</a></span> <span class="keyword">namespace </span>io {</div> +<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div> +<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="namespaceprocess_1_1io.html#aca1f059ca9f0d7360631c621debeb879"> 34</a></span> <span class="keyword">const</span> <span class="keywordtype">short</span> <a class="code" href="namespaceprocess_1_1io.html#aca1f059ca9f0d7360631c621debeb879">READ</a> = 0x01;</div> +<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div> +<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="namespaceprocess_1_1io.html#ab005316d71b45c5b05de0a6234c6f8fc"> 39</a></span> <span class="keyword">const</span> <span class="keywordtype">short</span> <a class="code" href="namespaceprocess_1_1io.html#ab005316d71b45c5b05de0a6234c6f8fc">WRITE</a> = 0x02;</div> +<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div> +<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="namespaceprocess_1_1io.html#a34d62916736c1dfebd1585cf51f19d0c"> 46</a></span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="namespaceprocess_1_1io.html#a34d62916736c1dfebd1585cf51f19d0c">BUFFERED_READ_SIZE</a> = 16*4096;</div> +<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> </div> +<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment">// TODO(benh): Add a version which takes multiple file descriptors.</span></div> +<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <a class="code" href="classprocess_1_1Future.html">Future<short></a> <a class="code" href="namespaceprocess_1_1io.html#af71c45e0a85e21f6b39060f4e716cebf">poll</a>(<a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> fd, <span class="keywordtype">short</span> events);</div> +<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div> +<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div> +<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <a class="code" href="classprocess_1_1Future.html">Future<size_t></a> <a class="code" href="namespaceprocess_1_1io.html#a4c34d22e475e29f12ac739921dcc580f">read</a>(<a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> fd, <span class="keywordtype">void</span>* data, <span class="keywordtype">size_t</span> <a class="code" href="namespaceos_1_1stat.html#aac17a91dd3f91341b8c4021025e89b04">size</a>);</div> +<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div> +<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div> +<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <a class="code" href="classprocess_1_1Future.html">Future<std::string></a> <a class="code" href="namespaceprocess_1_1io.html#a4c34d22e475e29f12ac739921dcc580f">read</a>(<a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> fd);</div> +<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div> +<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> </div> +<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <a class="code" href="classprocess_1_1Future.html">Future<size_t></a> <a class="code" href="namespaceprocess_1_1io.html#a49105dc036ad04225c92bd673da5ce39">write</a>(<a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> fd, <span class="keyword">const</span> <span class="keywordtype">void</span>* data, <span class="keywordtype">size_t</span> <a class="code" href="namespaceos_1_1stat.html#aac17a91dd3f91341b8c4021025e89b04">size</a>);</div> +<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div> +<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> </div> +<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <a class="code" href="classprocess_1_1Future.html">Future<Nothing></a> <a class="code" href="namespaceprocess_1_1io.html#a49105dc036ad04225c92bd673da5ce39">write</a>(<a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> fd, <span class="keyword">const</span> std::string& data);</div> +<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div> +<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <a class="code" href="classprocess_1_1Future.html">Future<Nothing></a> <a class="code" href="namespaceprocess_1_1io.html#ab9c4a52a88fcc9983438e391643424ca">redirect</a>(</div> +<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <a class="code" href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a> from,</div> +<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <a class="code" href="classOption.html">Option<int_fd></a> to,</div> +<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordtype">size_t</span> chunk = 4096,</div> +<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="keyword">const</span> std::vector<lambda::function<<span class="keywordtype">void</span>(<span class="keyword">const</span> std::string&)>>& hooks = {});</div> +<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> </div> +<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> } <span class="comment">// namespace io {</span></div> +<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> } <span class="comment">// namespace process {</span></div> +<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> </div> +<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="preprocessor">#endif // __PROCESS_IO_HPP__</span></div> +<div class="ttc" id="namespaceprocess_1_1io_html_aca1f059ca9f0d7360631c621debeb879"><div class="ttname"><a href="namespaceprocess_1_1io.html#aca1f059ca9f0d7360631c621debeb879">process::io::READ</a></div><div class="ttdeci">const short READ</div><div class="ttdoc">A possible event while polling. </div><div class="ttdef"><b>Definition:</b> io.hpp:34</div></div> +<div class="ttc" id="classOption_html"><div class="ttname"><a href="classOption.html">Option< int_fd ></a></div></div> +<div class="ttc" id="namespaceprocess_1_1io_html_a34d62916736c1dfebd1585cf51f19d0c"><div class="ttname"><a href="namespaceprocess_1_1io.html#a34d62916736c1dfebd1585cf51f19d0c">process::io::BUFFERED_READ_SIZE</a></div><div class="ttdeci">const size_t BUFFERED_READ_SIZE</div><div class="ttdoc">Buffered read chunk size. </div><div class="ttdef"><b>Definition:</b> io.hpp:46</div></div> +<div class="ttc" id="namespaceprocess_1_1io_html_af71c45e0a85e21f6b39060f4e716cebf"><div class="ttname"><a href="namespaceprocess_1_1io.html#af71c45e0a85e21f6b39060f4e716cebf">process::io::poll</a></div><div class="ttdeci">Future< short > poll(int_fd fd, short events)</div><div class="ttdoc">Returns the events (a subset of the events specified) that can be performed on the specified file des...</div></div> +<div class="ttc" id="namespaceprocess_1_1io_html_ab9c4a52a88fcc9983438e391643424ca"><div class="ttname"><a href="namespaceprocess_1_1io.html#ab9c4a52a88fcc9983438e391643424ca">process::io::redirect</a></div><div class="ttdeci">Future< Nothing > redirect(int_fd from, Option< int_fd > to, size_t chunk=4096, const std::vector< lambda::function< void(const std::string &)>> &hooks={})</div><div class="ttdoc">Redirect output from the &#39;from&#39; file descriptor to the &#39;to&#39; file descriptor (or /dev/null if &#39;to&#39; is ...</div></div> +<div class="ttc" id="3rdparty_2stout_2include_2stout_2windows_8hpp_html"><div class="ttname"><a href="3rdparty_2stout_2include_2stout_2windows_8hpp.html">windows.hpp</a></div></div> +<div class="ttc" id="namespaceprocess_1_1io_html_a49105dc036ad04225c92bd673da5ce39"><div class="ttname"><a href="namespaceprocess_1_1io.html#a49105dc036ad04225c92bd673da5ce39">process::io::write</a></div><div class="ttdeci">Future< size_t > write(int_fd fd, const void *data, size_t size)</div><div class="ttdoc">Performs a single non-blocking write by polling on the specified file descriptor until data can be be...</div></div> +<div class="ttc" id="nothing_8hpp_html"><div class="ttname"><a href="nothing_8hpp.html">nothing.hpp</a></div></div> +<div class="ttc" id="namespaceprocess_1_1io_html_ab005316d71b45c5b05de0a6234c6f8fc"><div class="ttname"><a href="namespaceprocess_1_1io.html#ab005316d71b45c5b05de0a6234c6f8fc">process::io::WRITE</a></div><div class="ttdeci">const short WRITE</div><div class="ttdoc">A possible event while polling. </div><div class="ttdef"><b>Definition:</b> io.hpp:39</div></div> +<div class="ttc" id="namespaceos_1_1stat_html_aac17a91dd3f91341b8c4021025e89b04"><div class="ttname"><a href="namespaceos_1_1stat.html#aac17a91dd3f91341b8c4021025e89b04">os::stat::size</a></div><div class="ttdeci">Try< Bytes > size(const std::string &path, const FollowSymlink follow=FOLLOW_SYMLINK)</div><div class="ttdef"><b>Definition:</b> stat.hpp:88</div></div> +<div class="ttc" id="future_8hpp_html"><div class="ttname"><a href="future_8hpp.html">future.hpp</a></div></div> +<div class="ttc" id="namespaceos_html_ae19e4161a51b86a1f330f3bf1dc75389"><div class="ttname"><a href="namespaceos.html#ae19e4161a51b86a1f330f3bf1dc75389">os::process</a></div><div class="ttdeci">Result< Process > process(pid_t pid)</div><div class="ttdef"><b>Definition:</b> freebsd.hpp:30</div></div> +<div class="ttc" id="namespaceprocess_1_1io_html_a4c34d22e475e29f12ac739921dcc580f"><div class="ttname"><a href="namespaceprocess_1_1io.html#a4c34d22e475e29f12ac739921dcc580f">process::io::read</a></div><div class="ttdeci">Future< size_t > read(int_fd fd, void *data, size_t size)</div><div class="ttdoc">Performs a single non-blocking read by polling on the specified file descriptor until any data can be...</div></div> +<div class="ttc" id="int__fd_8hpp_html_aea4dbda01c90455f158ffa9b924c2f07"><div class="ttname"><a href="int__fd_8hpp.html#aea4dbda01c90455f158ffa9b924c2f07">int_fd</a></div><div class="ttdeci">int int_fd</div><div class="ttdef"><b>Definition:</b> int_fd.hpp:35</div></div> +<div class="ttc" id="classprocess_1_1Future_html"><div class="ttname"><a href="classprocess_1_1Future.html">process::Future</a></div><div class="ttdef"><b>Definition:</b> future.hpp:56</div></div> +</div><!-- fragment --></div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.5 +</small></address> +</body> +</html> http://git-wip-us.apache.org/repos/asf/mesos-site/blob/a3206036/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2limiter_8hpp.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2limiter_8hpp.html b/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2limiter_8hpp.html new file mode 100644 index 0000000..906ae3b --- /dev/null +++ b/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2limiter_8hpp.html @@ -0,0 +1,92 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.5"/> +<title>Apache Mesos: 3rdparty/libprocess/include/process/limiter.hpp File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">Apache Mesos + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.5 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li><a href="examples.html"><span>Examples</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_8cab8f464681f7cc51cee77e79a434cd.html">3rdparty</a></li><li class="navelem"><a class="el" href="dir_043a76de98701f9bddf61b5e98f305ff.html">libprocess</a></li><li class="navelem"><a class="el" href="dir_eac18f7a64f6f8afbd1493ef4e09abdb.html">include</a></li><li class="navelem"><a class="el" href="dir_1894286df79cf582d947dbc4268b06cf.html">process</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> | +<a href="#namespaces">Namespaces</a> </div> + <div class="headertitle"> +<div class="title">limiter.hpp File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <deque></code><br/> +<code>#include <<a class="el" href="defer_8hpp_source.html">process/defer.hpp</a>></code><br/> +<code>#include <<a class="el" href="delay_8hpp_source.html">process/delay.hpp</a>></code><br/> +<code>#include <<a class="el" href="dispatch_8hpp_source.html">process/dispatch.hpp</a>></code><br/> +<code>#include <<a class="el" href="id_8hpp_source.html">process/id.hpp</a>></code><br/> +<code>#include <<a class="el" href="future_8hpp_source.html">process/future.hpp</a>></code><br/> +<code>#include <<a class="el" href="libprocess_2include_2process_2process_8hpp_source.html">process/process.hpp</a>></code><br/> +<code>#include <<a class="el" href="timeout_8hpp_source.html">process/timeout.hpp</a>></code><br/> +<code>#include <<a class="el" href="duration_8hpp_source.html">stout/duration.hpp</a>></code><br/> +<code>#include <<a class="el" href="foreach_8hpp_source.html">stout/foreach.hpp</a>></code><br/> +<code>#include <<a class="el" href="nothing_8hpp_source.html">stout/nothing.hpp</a>></code><br/> +</div> +<p><a href="3rdparty_2libprocess_2include_2process_2limiter_8hpp_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classprocess_1_1RateLimiter.html">process::RateLimiter</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classprocess_1_1RateLimiterProcess.html">process::RateLimiterProcess</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a> +Namespaces</h2></td></tr> +<tr class="memitem:namespaceprocess"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess.html">process</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.5 +</small></address> +</body> +</html> http://git-wip-us.apache.org/repos/asf/mesos-site/blob/a3206036/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2limiter_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2limiter_8hpp_source.html b/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2limiter_8hpp_source.html new file mode 100644 index 0000000..5d8e857 --- /dev/null +++ b/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2limiter_8hpp_source.html @@ -0,0 +1,294 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.5"/> +<title>Apache Mesos: 3rdparty/libprocess/include/process/limiter.hpp Source File</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">Apache Mesos + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.5 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li><a href="examples.html"><span>Examples</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_8cab8f464681f7cc51cee77e79a434cd.html">3rdparty</a></li><li class="navelem"><a class="el" href="dir_043a76de98701f9bddf61b5e98f305ff.html">libprocess</a></li><li class="navelem"><a class="el" href="dir_eac18f7a64f6f8afbd1493ef4e09abdb.html">include</a></li><li class="navelem"><a class="el" href="dir_1894286df79cf582d947dbc4268b06cf.html">process</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">limiter.hpp</div> </div> +</div><!--header--> +<div class="contents"> +<a href="3rdparty_2libprocess_2include_2process_2limiter_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div> +<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// you may not use this file except in compliance with the License.</span></div> +<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// You may obtain a copy of the License at</span></div> +<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div> +<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div> +<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div> +<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div> +<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div> +<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div> +<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// See the License for the specific language governing permissions and</span></div> +<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// limitations under the License</span></div> +<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div> +<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#ifndef __PROCESS_LIMITER_HPP__</span></div> +<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor"></span><span class="preprocessor">#define __PROCESS_LIMITER_HPP__</span></div> +<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor"></span></div> +<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include <deque></span></div> +<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div> +<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include <<a class="code" href="defer_8hpp.html">process/defer.hpp</a>></span></div> +<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include <<a class="code" href="delay_8hpp.html">process/delay.hpp</a>></span></div> +<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <<a class="code" href="dispatch_8hpp.html">process/dispatch.hpp</a>></span></div> +<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <<a class="code" href="id_8hpp.html">process/id.hpp</a>></span></div> +<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <<a class="code" href="future_8hpp.html">process/future.hpp</a>></span></div> +<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include <<a class="code" href="libprocess_2include_2process_2process_8hpp.html">process/process.hpp</a>></span></div> +<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <<a class="code" href="timeout_8hpp.html">process/timeout.hpp</a>></span></div> +<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div> +<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <<a class="code" href="duration_8hpp.html">stout/duration.hpp</a>></span></div> +<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <<a class="code" href="foreach_8hpp.html">stout/foreach.hpp</a>></span></div> +<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <<a class="code" href="nothing_8hpp.html">stout/nothing.hpp</a>></span></div> +<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div> +<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">namespace </span><a class="code" href="namespaceos.html#ae19e4161a51b86a1f330f3bf1dc75389">process</a> {</div> +<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div> +<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment">// Forward declaration.</span></div> +<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">class </span>RateLimiterProcess;</div> +<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div> +<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment">// Provides an abstraction that rate limits the number of "permits"</span></div> +<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// that can be acquired over some duration.</span></div> +<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment">// NOTE: Currently, each libprocess Process should use a separate</span></div> +<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment">// RateLimiter instance. This is because if multiple processes share</span></div> +<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment">// a RateLimiter instance, by the time a process acts on the Future</span></div> +<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="comment">// returned by 'acquire()' another process might have acquired the</span></div> +<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="comment">// next permit and do its rate limited operation.</span></div> +<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classprocess_1_1RateLimiter.html"> 42</a></span> <span class="keyword">class </span><a class="code" href="classprocess_1_1RateLimiter.html">RateLimiter</a></div> +<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> {</div> +<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="keyword">public</span>:</div> +<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <a class="code" href="classprocess_1_1RateLimiter.html#a0713f934ac780968289ea0bcbe7cc6ee">RateLimiter</a>(<span class="keywordtype">int</span> permits, <span class="keyword">const</span> <a class="code" href="classDuration.html">Duration</a>& duration);</div> +<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keyword">explicit</span> <a class="code" href="classprocess_1_1RateLimiter.html#a0713f934ac780968289ea0bcbe7cc6ee">RateLimiter</a>(<span class="keywordtype">double</span> permitsPerSecond);</div> +<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keyword">virtual</span> <a class="code" href="classprocess_1_1RateLimiter.html#a09f3220a7f68fb473745accc16847f45">~RateLimiter</a>();</div> +<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div> +<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="comment">// Returns a future that becomes ready when the permit is acquired.</span></div> +<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="comment">// Discarding this future cancels this acquisition.</span></div> +<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keyword">virtual</span> <a class="code" href="classprocess_1_1Future.html">Future<Nothing></a> <a class="code" href="classprocess_1_1RateLimiter.html#aeba2f8234c93c3f34cd6de8fbc595b96">acquire</a>() <span class="keyword">const</span>;</div> +<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div> +<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="keyword">private</span>:</div> +<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="comment">// Not copyable, not assignable.</span></div> +<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <a class="code" href="classprocess_1_1RateLimiter.html#a0713f934ac780968289ea0bcbe7cc6ee">RateLimiter</a>(<span class="keyword">const</span> <a class="code" href="classprocess_1_1RateLimiter.html">RateLimiter</a>&);</div> +<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <a class="code" href="classprocess_1_1RateLimiter.html">RateLimiter</a>& operator=(<span class="keyword">const</span> <a class="code" href="classprocess_1_1RateLimiter.html">RateLimiter</a>&);</div> +<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div> +<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <a class="code" href="classprocess_1_1RateLimiterProcess.html">RateLimiterProcess</a>* process;</div> +<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> };</div> +<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div> +<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> </div> +<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classprocess_1_1RateLimiterProcess.html"> 62</a></span> <span class="keyword">class </span><a class="code" href="classprocess_1_1RateLimiterProcess.html">RateLimiterProcess</a> : <span class="keyword">public</span> <a class="code" href="classprocess_1_1Process.html">Process</a><RateLimiterProcess></div> +<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> {</div> +<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="keyword">public</span>:</div> +<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classprocess_1_1RateLimiterProcess.html#aba017815b6fb2fb21894733c26ccc7c6"> 65</a></span>  <a class="code" href="classprocess_1_1RateLimiterProcess.html#aba017815b6fb2fb21894733c26ccc7c6">RateLimiterProcess</a>(<span class="keywordtype">int</span> permits, <span class="keyword">const</span> <a class="code" href="classDuration.html">Duration</a>& duration)</div> +<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  : <a class="code" href="classprocess_1_1ProcessBase.html">ProcessBase</a>(ID::<a class="code" href="namespaceprocess_1_1ID.html#aeb11a48c9def1da169d8455a30d0ee39">generate</a>(<span class="stringliteral">"__limiter__"</span>))</div> +<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  {</div> +<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  CHECK_GT(permits, 0);</div> +<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  CHECK_GT(duration.<a class="code" href="classDuration.html#a31ebb8d92dc93914cb830d70753d802b">secs</a>(), 0);</div> +<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  permitsPerSecond = permits / duration.<a class="code" href="classDuration.html#a31ebb8d92dc93914cb830d70753d802b">secs</a>();</div> +<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  }</div> +<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> </div> +<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="classprocess_1_1RateLimiterProcess.html#a7bb926cce009ffbe0de571b37e406578"> 73</a></span>  <span class="keyword">explicit</span> <a class="code" href="classprocess_1_1RateLimiterProcess.html#a7bb926cce009ffbe0de571b37e406578">RateLimiterProcess</a>(<span class="keywordtype">double</span> _permitsPerSecond)</div> +<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  : <a class="code" href="classprocess_1_1ProcessBase.html">ProcessBase</a>(ID::<a class="code" href="namespaceprocess_1_1ID.html#aeb11a48c9def1da169d8455a30d0ee39">generate</a>(<span class="stringliteral">"__limiter__"</span>)),</div> +<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  permitsPerSecond(_permitsPerSecond)</div> +<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  {</div> +<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  CHECK_GT(permitsPerSecond, 0);</div> +<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  }</div> +<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div> +<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classprocess_1_1RateLimiterProcess.html#a52f385d91c5420d62baef6c6054b408a"> 80</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classprocess_1_1RateLimiterProcess.html#a52f385d91c5420d62baef6c6054b408a">finalize</a>()</div> +<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  {</div> +<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">foreach</span> (<a class="code" href="classprocess_1_1Promise.html">Promise<Nothing></a>* <a class="code" href="namespacemesos_1_1internal_1_1log_1_1protocol.html#a3b1f8bd7b18c51af9d1f58842950b545">promise</a>, promises) {</div> +<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  promise-><a class="code" href="classprocess_1_1Promise.html#a8f50fcfd7ddb6dd39ec2cd468377cd5d">discard</a>();</div> +<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keyword">delete</span> <a class="code" href="namespacemesos_1_1internal_1_1log_1_1protocol.html#a3b1f8bd7b18c51af9d1f58842950b545">promise</a>;</div> +<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  }</div> +<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  promises.clear();</div> +<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  }</div> +<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> </div> +<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classprocess_1_1RateLimiterProcess.html#a086e9e06200ceca6f9c6407e906406fc"> 89</a></span>  <a class="code" href="classprocess_1_1Future.html">Future<Nothing></a> <a class="code" href="classprocess_1_1RateLimiterProcess.html#a086e9e06200ceca6f9c6407e906406fc">acquire</a>()</div> +<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  {</div> +<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordflow">if</span> (!promises.empty()) {</div> +<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="comment">// Need to wait for others to get permits first.</span></div> +<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <a class="code" href="classprocess_1_1Promise.html">Promise<Nothing></a>* <a class="code" href="namespacemesos_1_1internal_1_1log_1_1protocol.html#a3b1f8bd7b18c51af9d1f58842950b545">promise</a> = <span class="keyword">new</span> <a class="code" href="classprocess_1_1Promise.html">Promise<Nothing></a>();</div> +<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  promises.push_back(promise);</div> +<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keywordflow">return</span> promise-><a class="code" href="classprocess_1_1Promise.html#a8aef752d6c90cb11e58e3166b7592ef1">future</a>()</div> +<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  .<a class="code" href="classprocess_1_1Future.html#a1b80bf321358be44880d9c6bae5d9a2d">onDiscard</a>(<a class="code" href="namespaceprocess.html#a8b27a2ef76eb133bf0ce7a5eea4fb77c">defer</a>(<span class="keyword">self</span>(), &Self::discard, promise-><a class="code" href="classprocess_1_1Promise.html#a8aef752d6c90cb11e58e3166b7592ef1">future</a>()));</div> +<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  }</div> +<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div> +<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keywordflow">if</span> (timeout.<a class="code" href="classprocess_1_1Timeout.html#a154543bc53bace270ac54a12b52a1833">remaining</a>() > <a class="code" href="classSeconds.html">Seconds</a>(0)) {</div> +<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="comment">// Need to wait a bit longer, but first one in the queue.</span></div> +<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <a class="code" href="classprocess_1_1Promise.html">Promise<Nothing></a>* <a class="code" href="namespacemesos_1_1internal_1_1log_1_1protocol.html#a3b1f8bd7b18c51af9d1f58842950b545">promise</a> = <span class="keyword">new</span> <a class="code" href="classprocess_1_1Promise.html">Promise<Nothing></a>();</div> +<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  promises.push_back(promise);</div> +<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <a class="code" href="namespaceprocess.html#ad46335bec9fe626e60003c33e8f13023">delay</a>(timeout.<a class="code" href="classprocess_1_1Timeout.html#a154543bc53bace270ac54a12b52a1833">remaining</a>(), <span class="keyword">self</span>(), &Self::_acquire);</div> +<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordflow">return</span> promise-><a class="code" href="classprocess_1_1Promise.html#a8aef752d6c90cb11e58e3166b7592ef1">future</a>()</div> +<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  .<a class="code" href="classprocess_1_1Future.html#a1b80bf321358be44880d9c6bae5d9a2d">onDiscard</a>(<a class="code" href="namespaceprocess.html#a8b27a2ef76eb133bf0ce7a5eea4fb77c">defer</a>(<span class="keyword">self</span>(), &Self::discard, promise-><a class="code" href="classprocess_1_1Promise.html#a8aef752d6c90cb11e58e3166b7592ef1">future</a>()));</div> +<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  }</div> +<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div> +<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="comment">// No need to wait!</span></div> +<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  timeout = <a class="code" href="classSeconds.html">Seconds</a>(1) / permitsPerSecond;</div> +<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordflow">return</span> <a class="code" href="structNothing.html">Nothing</a>();</div> +<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  }</div> +<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> </div> +<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="keyword">private</span>:</div> +<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="comment">// Not copyable, not assignable.</span></div> +<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <a class="code" href="classprocess_1_1RateLimiterProcess.html#aba017815b6fb2fb21894733c26ccc7c6">RateLimiterProcess</a>(<span class="keyword">const</span> <a class="code" href="classprocess_1_1RateLimiterProcess.html">RateLimiterProcess</a>&);</div> +<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <a class="code" href="classprocess_1_1RateLimiterProcess.html">RateLimiterProcess</a>& operator=(<span class="keyword">const</span> <a class="code" href="classprocess_1_1RateLimiterProcess.html">RateLimiterProcess</a>&);</div> +<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> </div> +<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordtype">void</span> _acquire()</div> +<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  {</div> +<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  CHECK(!promises.empty());</div> +<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> </div> +<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="comment">// Keep removing the top of the queue until we find a promise</span></div> +<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="comment">// whose future is not discarded.</span></div> +<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordflow">while</span> (!promises.empty()) {</div> +<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <a class="code" href="classprocess_1_1Promise.html">Promise<Nothing></a>* <a class="code" href="namespacemesos_1_1internal_1_1log_1_1protocol.html#a3b1f8bd7b18c51af9d1f58842950b545">promise</a> = promises.front();</div> +<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  promises.pop_front();</div> +<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keywordflow">if</span> (!promise-><a class="code" href="classprocess_1_1Promise.html#a8aef752d6c90cb11e58e3166b7592ef1">future</a>().<a class="code" href="classprocess_1_1Future.html#abc89036db733a417b7b383b091efaf3c">isDiscarded</a>()) {</div> +<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  promise-><a class="code" href="classprocess_1_1Promise.html#a989b8dfa7eb2633de3f0f25ac2b87943">set</a>(<a class="code" href="structNothing.html">Nothing</a>());</div> +<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="keyword">delete</span> <a class="code" href="namespacemesos_1_1internal_1_1log_1_1protocol.html#a3b1f8bd7b18c51af9d1f58842950b545">promise</a>;</div> +<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  timeout = <a class="code" href="classSeconds.html">Seconds</a>(1) / permitsPerSecond;</div> +<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordflow">break</span>;</div> +<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  } <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keyword">delete</span> <a class="code" href="namespacemesos_1_1internal_1_1log_1_1protocol.html#a3b1f8bd7b18c51af9d1f58842950b545">promise</a>;</div> +<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  }</div> +<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  }</div> +<div class="line"><a name="l00136"></a><span class="lineno"> 136</span> </div> +<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="comment">// Repeat if necessary.</span></div> +<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordflow">if</span> (!promises.empty()) {</div> +<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <a class="code" href="namespaceprocess.html#ad46335bec9fe626e60003c33e8f13023">delay</a>(timeout.<a class="code" href="classprocess_1_1Timeout.html#a154543bc53bace270ac54a12b52a1833">remaining</a>(), <span class="keyword">self</span>(), &Self::_acquire);</div> +<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  }</div> +<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  }</div> +<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> </div> +<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordtype">void</span> discard(<span class="keyword">const</span> Future<Nothing>& future)</div> +<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  {</div> +<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keywordflow">foreach</span> (Promise<Nothing>* promise, promises) {</div> +<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordflow">if</span> (promise->future() == future) {</div> +<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  promise->discard();</div> +<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  }</div> +<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  }</div> +<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  }</div> +<div class="line"><a name="l00151"></a><span class="lineno"> 151</span> </div> +<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <span class="keywordtype">double</span> permitsPerSecond;</div> +<div class="line"><a name="l00153"></a><span class="lineno"> 153</span> </div> +<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  Timeout timeout;</div> +<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> </div> +<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  std::deque<Promise<Nothing>*> promises;</div> +<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> };</div> +<div class="line"><a name="l00158"></a><span class="lineno"> 158</span> </div> +<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> </div> +<div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="classprocess_1_1RateLimiter.html#a0713f934ac780968289ea0bcbe7cc6ee"> 160</a></span> <span class="keyword">inline</span> <a class="code" href="classprocess_1_1RateLimiter.html#a0713f934ac780968289ea0bcbe7cc6ee">RateLimiter::RateLimiter</a>(<span class="keywordtype">int</span> permits, <span class="keyword">const</span> <a class="code" href="classDuration.html">Duration</a>& duration)</div> +<div class="line"><a name="l00161"></a><span class="lineno"> 161</span> {</div> +<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  process = <span class="keyword">new</span> <a class="code" href="classprocess_1_1RateLimiterProcess.html">RateLimiterProcess</a>(permits, duration);</div> +<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <a class="code" href="namespaceprocess.html#aff22904a83567125d3b4d0d88e5a2270">spawn</a>(process);</div> +<div class="line"><a name="l00164"></a><span class="lineno"> 164</span> }</div> +<div class="line"><a name="l00165"></a><span class="lineno"> 165</span> </div> +<div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div> +<div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="classprocess_1_1RateLimiter.html#a8e2352ea8c6e3817ba54861579f79a6a"> 167</a></span> <span class="keyword">inline</span> <a class="code" href="classprocess_1_1RateLimiter.html#a0713f934ac780968289ea0bcbe7cc6ee">RateLimiter::RateLimiter</a>(<span class="keywordtype">double</span> permitsPerSecond)</div> +<div class="line"><a name="l00168"></a><span class="lineno"> 168</span> {</div> +<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  process = <span class="keyword">new</span> <a class="code" href="classprocess_1_1RateLimiterProcess.html">RateLimiterProcess</a>(permitsPerSecond);</div> +<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <a class="code" href="namespaceprocess.html#aff22904a83567125d3b4d0d88e5a2270">spawn</a>(process);</div> +<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> }</div> +<div class="line"><a name="l00172"></a><span class="lineno"> 172</span> </div> +<div class="line"><a name="l00173"></a><span class="lineno"> 173</span> </div> +<div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="classprocess_1_1RateLimiter.html#a09f3220a7f68fb473745accc16847f45"> 174</a></span> <span class="keyword">inline</span> <a class="code" href="classprocess_1_1RateLimiter.html#a09f3220a7f68fb473745accc16847f45">RateLimiter::~RateLimiter</a>()</div> +<div class="line"><a name="l00175"></a><span class="lineno"> 175</span> {</div> +<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <a class="code" href="namespaceprocess.html#a20443908afa3212215166e26065349e5">terminate</a>(process);</div> +<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <a class="code" href="namespaceprocess.html#a07833fb41a8b0c1f18fa5485ca8c18d4">wait</a>(process);</div> +<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keyword">delete</span> process;</div> +<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> }</div> +<div class="line"><a name="l00180"></a><span class="lineno"> 180</span> </div> +<div class="line"><a name="l00181"></a><span class="lineno"> 181</span> </div> +<div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="classprocess_1_1RateLimiter.html#aeba2f8234c93c3f34cd6de8fbc595b96"> 182</a></span> <span class="keyword">inline</span> <a class="code" href="classprocess_1_1Future.html">Future<Nothing></a> <a class="code" href="classprocess_1_1RateLimiter.html#aeba2f8234c93c3f34cd6de8fbc595b96">RateLimiter::acquire</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00183"></a><span class="lineno"> 183</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keywordflow">return</span> <a class="code" href="namespaceprocess.html#acfbc29404bc653268289691b0dd59e22">dispatch</a>(process, &<a class="code" href="classprocess_1_1RateLimiterProcess.html#a086e9e06200ceca6f9c6407e906406fc">RateLimiterProcess::acquire</a>);</div> +<div class="line"><a name="l00185"></a><span class="lineno"> 185</span> }</div> +<div class="line"><a name="l00186"></a><span class="lineno"> 186</span> </div> +<div class="line"><a name="l00187"></a><span class="lineno"> 187</span> } <span class="comment">// namespace process {</span></div> +<div class="line"><a name="l00188"></a><span class="lineno"> 188</span> </div> +<div class="line"><a name="l00189"></a><span class="lineno"> 189</span> <span class="preprocessor">#endif // __PROCESS_LIMITER_HPP__</span></div> +<div class="ttc" id="namespaceprocess_1_1ID_html_aeb11a48c9def1da169d8455a30d0ee39"><div class="ttname"><a href="namespaceprocess_1_1ID.html#aeb11a48c9def1da169d8455a30d0ee39">process::ID::generate</a></div><div class="ttdeci">std::string generate(const std::string &prefix="")</div><div class="ttdoc">Returns &#39;prefix(N)&#39; where N represents the number of instances where the same prefix (wrt...</div></div> +<div class="ttc" id="structNothing_html"><div class="ttname"><a href="structNothing.html">Nothing</a></div><div class="ttdef"><b>Definition:</b> nothing.hpp:16</div></div> +<div class="ttc" id="delay_8hpp_html"><div class="ttname"><a href="delay_8hpp.html">delay.hpp</a></div></div> +<div class="ttc" id="classprocess_1_1Promise_html_a989b8dfa7eb2633de3f0f25ac2b87943"><div class="ttname"><a href="classprocess_1_1Promise.html#a989b8dfa7eb2633de3f0f25ac2b87943">process::Promise::set</a></div><div class="ttdeci">bool set(const T &_t)</div><div class="ttdef"><b>Definition:</b> future.hpp:697</div></div> +<div class="ttc" id="timeout_8hpp_html"><div class="ttname"><a href="timeout_8hpp.html">timeout.hpp</a></div></div> +<div class="ttc" id="classprocess_1_1Future_html_a1b80bf321358be44880d9c6bae5d9a2d"><div class="ttname"><a href="classprocess_1_1Future.html#a1b80bf321358be44880d9c6bae5d9a2d">process::Future::onDiscard</a></div><div class="ttdeci">const Future< T > & onDiscard(DiscardCallback &&callback) const </div><div class="ttdef"><b>Definition:</b> future.hpp:1177</div></div> +<div class="ttc" id="classprocess_1_1ProcessBase_html"><div class="ttname"><a href="classprocess_1_1ProcessBase.html">process::ProcessBase</a></div><div class="ttdef"><b>Definition:</b> process.hpp:69</div></div> +<div class="ttc" id="classprocess_1_1RateLimiter_html_aeba2f8234c93c3f34cd6de8fbc595b96"><div class="ttname"><a href="classprocess_1_1RateLimiter.html#aeba2f8234c93c3f34cd6de8fbc595b96">process::RateLimiter::acquire</a></div><div class="ttdeci">virtual Future< Nothing > acquire() const </div><div class="ttdef"><b>Definition:</b> limiter.hpp:182</div></div> +<div class="ttc" id="dispatch_8hpp_html"><div class="ttname"><a href="dispatch_8hpp.html">dispatch.hpp</a></div></div> +<div class="ttc" id="classprocess_1_1RateLimiterProcess_html_aba017815b6fb2fb21894733c26ccc7c6"><div class="ttname"><a href="classprocess_1_1RateLimiterProcess.html#aba017815b6fb2fb21894733c26ccc7c6">process::RateLimiterProcess::RateLimiterProcess</a></div><div class="ttdeci">RateLimiterProcess(int permits, const Duration &duration)</div><div class="ttdef"><b>Definition:</b> limiter.hpp:65</div></div> +<div class="ttc" id="namespaceprocess_html_aff22904a83567125d3b4d0d88e5a2270"><div class="ttname"><a href="namespaceprocess.html#aff22904a83567125d3b4d0d88e5a2270">process::spawn</a></div><div class="ttdeci">UPID spawn(ProcessBase *process, bool manage=false)</div><div class="ttdoc">Spawn a new process. </div></div> +<div class="ttc" id="classDuration_html"><div class="ttname"><a href="classDuration.html">Duration</a></div><div class="ttdef"><b>Definition:</b> duration.hpp:32</div></div> +<div class="ttc" id="namespaceprocess_html_a20443908afa3212215166e26065349e5"><div class="ttname"><a href="namespaceprocess.html#a20443908afa3212215166e26065349e5">process::terminate</a></div><div class="ttdeci">void terminate(const UPID &pid, bool inject=true)</div><div class="ttdoc">Sends a TerminateEvent to the given process. </div></div> +<div class="ttc" id="classprocess_1_1RateLimiterProcess_html"><div class="ttname"><a href="classprocess_1_1RateLimiterProcess.html">process::RateLimiterProcess</a></div><div class="ttdef"><b>Definition:</b> limiter.hpp:62</div></div> +<div class="ttc" id="namespaceprocess_html_acfbc29404bc653268289691b0dd59e22"><div class="ttname"><a href="namespaceprocess.html#acfbc29404bc653268289691b0dd59e22">process::dispatch</a></div><div class="ttdeci">void dispatch(const PID< T > &pid, void(T::*method)())</div><div class="ttdef"><b>Definition:</b> dispatch.hpp:157</div></div> +<div class="ttc" id="duration_8hpp_html"><div class="ttname"><a href="duration_8hpp.html">duration.hpp</a></div></div> +<div class="ttc" id="classprocess_1_1Future_html_abc89036db733a417b7b383b091efaf3c"><div class="ttname"><a href="classprocess_1_1Future.html#abc89036db733a417b7b383b091efaf3c">process::Future::isDiscarded</a></div><div class="ttdeci">bool isDiscarded() const </div><div class="ttdef"><b>Definition:</b> future.hpp:1074</div></div> +<div class="ttc" id="nothing_8hpp_html"><div class="ttname"><a href="nothing_8hpp.html">nothing.hpp</a></div></div> +<div class="ttc" id="classSeconds_html"><div class="ttname"><a href="classSeconds.html">Seconds</a></div><div class="ttdef"><b>Definition:</b> duration.hpp:243</div></div> +<div class="ttc" id="classprocess_1_1RateLimiterProcess_html_a7bb926cce009ffbe0de571b37e406578"><div class="ttname"><a href="classprocess_1_1RateLimiterProcess.html#a7bb926cce009ffbe0de571b37e406578">process::RateLimiterProcess::RateLimiterProcess</a></div><div class="ttdeci">RateLimiterProcess(double _permitsPerSecond)</div><div class="ttdef"><b>Definition:</b> limiter.hpp:73</div></div> +<div class="ttc" id="classprocess_1_1RateLimiterProcess_html_a52f385d91c5420d62baef6c6054b408a"><div class="ttname"><a href="classprocess_1_1RateLimiterProcess.html#a52f385d91c5420d62baef6c6054b408a">process::RateLimiterProcess::finalize</a></div><div class="ttdeci">virtual void finalize()</div><div class="ttdoc">Invoked when a process is terminated. </div><div class="ttdef"><b>Definition:</b> limiter.hpp:80</div></div> +<div class="ttc" id="classprocess_1_1Promise_html"><div class="ttname"><a href="classprocess_1_1Promise.html">process::Promise< Nothing ></a></div></div> +<div class="ttc" id="namespaceprocess_html_ad46335bec9fe626e60003c33e8f13023"><div class="ttname"><a href="namespaceprocess.html#ad46335bec9fe626e60003c33e8f13023">process::delay</a></div><div class="ttdeci">Timer delay(const Duration &duration, const PID< T > &pid, void(T::*method)())</div><div class="ttdef"><b>Definition:</b> delay.hpp:31</div></div> +<div class="ttc" id="namespacemesos_1_1internal_1_1log_1_1protocol_html_a3b1f8bd7b18c51af9d1f58842950b545"><div class="ttname"><a href="namespacemesos_1_1internal_1_1log_1_1protocol.html#a3b1f8bd7b18c51af9d1f58842950b545">mesos::internal::log::protocol::promise</a></div><div class="ttdeci">Protocol< PromiseRequest, PromiseResponse > promise</div></div> +<div class="ttc" id="classDuration_html_a31ebb8d92dc93914cb830d70753d802b"><div class="ttname"><a href="classDuration.html#a31ebb8d92dc93914cb830d70753d802b">Duration::secs</a></div><div class="ttdeci">double secs() const </div><div class="ttdef"><b>Definition:</b> duration.hpp:90</div></div> +<div class="ttc" id="namespaceprocess_html_a07833fb41a8b0c1f18fa5485ca8c18d4"><div class="ttname"><a href="namespaceprocess.html#a07833fb41a8b0c1f18fa5485ca8c18d4">process::wait</a></div><div class="ttdeci">bool wait(const UPID &pid, const Duration &duration=Seconds(-1))</div><div class="ttdoc">Wait for the process to exit for no more than the specified seconds. </div></div> +<div class="ttc" id="future_8hpp_html"><div class="ttname"><a href="future_8hpp.html">future.hpp</a></div></div> +<div class="ttc" id="foreach_8hpp_html"><div class="ttname"><a href="foreach_8hpp.html">foreach.hpp</a></div></div> +<div class="ttc" id="namespaceos_html_ae19e4161a51b86a1f330f3bf1dc75389"><div class="ttname"><a href="namespaceos.html#ae19e4161a51b86a1f330f3bf1dc75389">os::process</a></div><div class="ttdeci">Result< Process > process(pid_t pid)</div><div class="ttdef"><b>Definition:</b> freebsd.hpp:30</div></div> +<div class="ttc" id="classprocess_1_1Promise_html_a8aef752d6c90cb11e58e3166b7592ef1"><div class="ttname"><a href="classprocess_1_1Promise.html#a8aef752d6c90cb11e58e3166b7592ef1">process::Promise::future</a></div><div class="ttdeci">Future< T > future() const </div><div class="ttdef"><b>Definition:</b> future.hpp:782</div></div> +<div class="ttc" id="classprocess_1_1Promise_html_a8f50fcfd7ddb6dd39ec2cd468377cd5d"><div class="ttname"><a href="classprocess_1_1Promise.html#a8f50fcfd7ddb6dd39ec2cd468377cd5d">process::Promise::discard</a></div><div class="ttdeci">bool discard()</div><div class="ttdef"><b>Definition:</b> future.hpp:680</div></div> +<div class="ttc" id="classprocess_1_1RateLimiter_html_a09f3220a7f68fb473745accc16847f45"><div class="ttname"><a href="classprocess_1_1RateLimiter.html#a09f3220a7f68fb473745accc16847f45">process::RateLimiter::~RateLimiter</a></div><div class="ttdeci">virtual ~RateLimiter()</div><div class="ttdef"><b>Definition:</b> limiter.hpp:174</div></div> +<div class="ttc" id="id_8hpp_html"><div class="ttname"><a href="id_8hpp.html">id.hpp</a></div></div> +<div class="ttc" id="classprocess_1_1Process_html"><div class="ttname"><a href="classprocess_1_1Process.html">process::Process</a></div><div class="ttdef"><b>Definition:</b> process.hpp:490</div></div> +<div class="ttc" id="defer_8hpp_html"><div class="ttname"><a href="defer_8hpp.html">defer.hpp</a></div></div> +<div class="ttc" id="namespaceprocess_html_a8b27a2ef76eb133bf0ce7a5eea4fb77c"><div class="ttname"><a href="namespaceprocess.html#a8b27a2ef76eb133bf0ce7a5eea4fb77c">process::defer</a></div><div class="ttdeci">Deferred< void()> defer(const PID< T > &pid, void(T::*method)())</div><div class="ttdef"><b>Definition:</b> defer.hpp:35</div></div> +<div class="ttc" id="classprocess_1_1RateLimiter_html"><div class="ttname"><a href="classprocess_1_1RateLimiter.html">process::RateLimiter</a></div><div class="ttdef"><b>Definition:</b> limiter.hpp:42</div></div> +<div class="ttc" id="classprocess_1_1RateLimiterProcess_html_a086e9e06200ceca6f9c6407e906406fc"><div class="ttname"><a href="classprocess_1_1RateLimiterProcess.html#a086e9e06200ceca6f9c6407e906406fc">process::RateLimiterProcess::acquire</a></div><div class="ttdeci">Future< Nothing > acquire()</div><div class="ttdef"><b>Definition:</b> limiter.hpp:89</div></div> +<div class="ttc" id="libprocess_2include_2process_2process_8hpp_html"><div class="ttname"><a href="libprocess_2include_2process_2process_8hpp.html">process.hpp</a></div></div> +<div class="ttc" id="classprocess_1_1RateLimiter_html_a0713f934ac780968289ea0bcbe7cc6ee"><div class="ttname"><a href="classprocess_1_1RateLimiter.html#a0713f934ac780968289ea0bcbe7cc6ee">process::RateLimiter::RateLimiter</a></div><div class="ttdeci">RateLimiter(int permits, const Duration &duration)</div><div class="ttdef"><b>Definition:</b> limiter.hpp:160</div></div> +<div class="ttc" id="classprocess_1_1Timeout_html_a154543bc53bace270ac54a12b52a1833"><div class="ttname"><a href="classprocess_1_1Timeout.html#a154543bc53bace270ac54a12b52a1833">process::Timeout::remaining</a></div><div class="ttdeci">Duration remaining() const </div><div class="ttdef"><b>Definition:</b> timeout.hpp:77</div></div> +<div class="ttc" id="classprocess_1_1Future_html"><div class="ttname"><a href="classprocess_1_1Future.html">process::Future< Nothing ></a></div></div> +</div><!-- fragment --></div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.5 +</small></address> +</body> +</html> http://git-wip-us.apache.org/repos/asf/mesos-site/blob/a3206036/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2logging_8hpp.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2logging_8hpp.html b/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2logging_8hpp.html new file mode 100644 index 0000000..ab2152c --- /dev/null +++ b/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2logging_8hpp.html @@ -0,0 +1,84 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.5"/> +<title>Apache Mesos: 3rdparty/libprocess/include/process/logging.hpp File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">Apache Mesos + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.5 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li><a href="examples.html"><span>Examples</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_8cab8f464681f7cc51cee77e79a434cd.html">3rdparty</a></li><li class="navelem"><a class="el" href="dir_043a76de98701f9bddf61b5e98f305ff.html">libprocess</a></li><li class="navelem"><a class="el" href="dir_eac18f7a64f6f8afbd1493ef4e09abdb.html">include</a></li><li class="navelem"><a class="el" href="dir_1894286df79cf582d947dbc4268b06cf.html">process</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> | +<a href="#namespaces">Namespaces</a> </div> + <div class="headertitle"> +<div class="title">logging.hpp File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <glog/logging.h></code><br/> +<code>#include <<a class="el" href="future_8hpp_source.html">process/future.hpp</a>></code><br/> +<code>#include <<a class="el" href="3rdparty_2libprocess_2include_2process_2http_8hpp_source.html">process/http.hpp</a>></code><br/> +<code>#include <<a class="el" href="libprocess_2include_2process_2process_8hpp_source.html">process/process.hpp</a>></code><br/> +<code>#include <<a class="el" href="timeout_8hpp_source.html">process/timeout.hpp</a>></code><br/> +</div> +<p><a href="3rdparty_2libprocess_2include_2process_2logging_8hpp_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classprocess_1_1Logging.html">process::Logging</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a> +Namespaces</h2></td></tr> +<tr class="memitem:namespaceprocess"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess.html">process</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.5 +</small></address> +</body> +</html>