| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <!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.13"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>GRPC C++: include/grpcpp/alarm.h 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="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/searchdata.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript"> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-60127042-1', 'auto'); ga('send', 'pageview'); </script></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 id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">GRPC C++
-  <span id="projectnumber">1.13.0-dev</span>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.13 -->
- <script type="text/javascript">
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- </script>
- <script type="text/javascript" src="menudata.js"></script>
- <script type="text/javascript" src="menu.js"></script>
- <script type="text/javascript">
- $(function() {
- initMenu('',true,false,'search.php','Search');
- $(document).ready(function() { init_search(); });
- });
- </script>
- <div id="main-nav"></div>
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- </div>
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
- <div id="nav-path" class="navpath">
- <ul>
- <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_412f9a3d5dfcba8716486cd870ef4586.html">grpcpp</a></li> </ul>
- </div>
- </div><!-- top -->
- <div class="header">
- <div class="headertitle">
- <div class="title">alarm.h</div> </div>
- </div><!--header-->
- <div class="contents">
- <a href="grpcpp_2alarm_8h.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">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> *</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Copyright 2015 gRPC authors.</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"> * Licensed under the Apache License, Version 2.0 (the "License");</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * You may obtain a copy of the License at</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> *</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> */</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#ifndef GRPCPP_ALARM_H</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#define GRPCPP_ALARM_H</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <<a class="code" href="grpc_8h.html">grpc/grpc.h</a>></span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <<a class="code" href="grpcpp_2impl_2codegen_2completion__queue_8h.html">grpcpp/impl/codegen/completion_queue.h</a>></span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <<a class="code" href="grpcpp_2impl_2codegen_2completion__queue__tag_8h.html">grpcpp/impl/codegen/completion_queue_tag.h</a>></span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <<a class="code" href="grpcpp_2impl_2codegen_2grpc__library_8h.html">grpcpp/impl/codegen/grpc_library.h</a>></span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <<a class="code" href="grpcpp_2impl_2codegen_2time_8h.html">grpcpp/impl/codegen/time.h</a>></span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <<a class="code" href="grpcpp_2impl_2grpc__library_8h.html">grpcpp/impl/grpc_library.h</a>></span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="namespacegrpc.html"> 31</a></span> <span class="keyword">namespace </span><a class="code" href="namespacegrpc.html">grpc</a> {</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classgrpc_1_1_alarm.html"> 34</a></span> <span class="keyword">class </span><a class="code" href="classgrpc_1_1_alarm.html">Alarm</a> : <span class="keyword">private</span> <a class="code" href="classgrpc_1_1_grpc_library_codegen.html">GrpcLibraryCodegen</a> {</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="keyword">public</span>:</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="code" href="classgrpc_1_1_alarm.html#a49ce7f2934d753389bd192574c509302">Alarm</a>();</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <a class="code" href="classgrpc_1_1_alarm.html#ab78846507ce33312823afcebe78a1215">~Alarm</a>();</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classgrpc_1_1_alarm.html#aa6c0bc180d800973956b13c793bbac9a"> 50</a></span>  <a class="code" href="classgrpc_1_1_alarm.html#aa6c0bc180d800973956b13c793bbac9a">Alarm</a>(<a class="code" href="classgrpc_1_1_completion_queue.html">CompletionQueue</a>* cq, <span class="keyword">const</span> T& deadline, <span class="keywordtype">void</span>* tag) : <a class="code" href="classgrpc_1_1_alarm.html">Alarm</a>() {</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  SetInternal(cq, <a class="code" href="classgrpc_1_1_time_point.html">TimePoint<T></a>(deadline).raw_time(), tag);</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> </div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classgrpc_1_1_alarm.html#a2cfc8a72d77c446e909c9747cd852cfa"> 59</a></span>  <span class="keywordtype">void</span> <a class="code" href="classgrpc_1_1_alarm.html#a2cfc8a72d77c446e909c9747cd852cfa">Set</a>(<a class="code" href="classgrpc_1_1_completion_queue.html">CompletionQueue</a>* cq, <span class="keyword">const</span> T& deadline, <span class="keywordtype">void</span>* tag) {</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  SetInternal(cq, <a class="code" href="classgrpc_1_1_time_point.html">TimePoint<T></a>(deadline).raw_time(), tag);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  }</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <a class="code" href="classgrpc_1_1_alarm.html#a49ce7f2934d753389bd192574c509302">Alarm</a>(<span class="keyword">const</span> <a class="code" href="classgrpc_1_1_alarm.html">Alarm</a>&) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <a class="code" href="classgrpc_1_1_alarm.html">Alarm</a>& <a class="code" href="classgrpc_1_1_alarm.html#a4c46dacfd26561470f0901cec2686f49">operator=</a>(<span class="keyword">const</span> <a class="code" href="classgrpc_1_1_alarm.html">Alarm</a>&) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classgrpc_1_1_alarm.html#ad75ad87050d7ad9b2f66dbd6ef0da056"> 68</a></span>  <a class="code" href="classgrpc_1_1_alarm.html#ad75ad87050d7ad9b2f66dbd6ef0da056">Alarm</a>(<a class="code" href="classgrpc_1_1_alarm.html">Alarm</a>&& rhs) : alarm_(rhs.alarm_) { rhs.alarm_ = <span class="keyword">nullptr</span>; }</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classgrpc_1_1_alarm.html#a47545b12ace3607ed259225e38eade46"> 69</a></span>  <a class="code" href="classgrpc_1_1_alarm.html">Alarm</a>& <a class="code" href="classgrpc_1_1_alarm.html#a47545b12ace3607ed259225e38eade46">operator=</a>(<a class="code" href="classgrpc_1_1_alarm.html">Alarm</a>&& rhs) {</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  alarm_ = rhs.alarm_;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  rhs.alarm_ = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  }</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span> </div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordtype">void</span> <a class="code" href="classgrpc_1_1_alarm.html#a57837c6b6d75f622c056b3050cf000fb">Cancel</a>();</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>  <span class="keyword">private</span>:</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordtype">void</span> SetInternal(<a class="code" href="classgrpc_1_1_completion_queue.html">CompletionQueue</a>* cq, <a class="code" href="structgpr__timespec.html">gpr_timespec</a> deadline, <span class="keywordtype">void</span>* tag);</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>  <a class="code" href="classgrpc_1_1internal_1_1_completion_queue_tag.html">internal::CompletionQueueTag</a>* alarm_;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> };</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> } <span class="comment">// namespace grpc</span></div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> </div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="preprocessor">#endif // GRPCPP_ALARM_H</span></div><div class="ttc" id="classgrpc_1_1_alarm_html_a2cfc8a72d77c446e909c9747cd852cfa"><div class="ttname"><a href="classgrpc_1_1_alarm.html#a2cfc8a72d77c446e909c9747cd852cfa">grpc::Alarm::Set</a></div><div class="ttdeci">void Set(CompletionQueue *cq, const T &deadline, void *tag)</div><div class="ttdoc">Trigger an alarm instance on completion queue cq at the specified time. </div><div class="ttdef"><b>Definition:</b> alarm.h:59</div></div>
- <div class="ttc" id="classgrpc_1_1_alarm_html"><div class="ttname"><a href="classgrpc_1_1_alarm.html">grpc::Alarm</a></div><div class="ttdoc">A thin wrapper around grpc_alarm (see / / src/core/surface/alarm.h). </div><div class="ttdef"><b>Definition:</b> alarm.h:34</div></div>
- <div class="ttc" id="classgrpc_1_1_alarm_html_aa6c0bc180d800973956b13c793bbac9a"><div class="ttname"><a href="classgrpc_1_1_alarm.html#aa6c0bc180d800973956b13c793bbac9a">grpc::Alarm::Alarm</a></div><div class="ttdeci">Alarm(CompletionQueue *cq, const T &deadline, void *tag)</div><div class="ttdoc">DEPRECATED: Create and set a completion queue alarm instance associated to cq. </div><div class="ttdef"><b>Definition:</b> alarm.h:50</div></div>
- <div class="ttc" id="grpcpp_2impl_2codegen_2completion__queue_8h_html"><div class="ttname"><a href="grpcpp_2impl_2codegen_2completion__queue_8h.html">completion_queue.h</a></div></div>
- <div class="ttc" id="classgrpc_1_1internal_1_1_completion_queue_tag_html"><div class="ttname"><a href="classgrpc_1_1internal_1_1_completion_queue_tag.html">grpc::internal::CompletionQueueTag</a></div><div class="ttdoc">An interface allowing implementors to process and filter event tags. </div><div class="ttdef"><b>Definition:</b> completion_queue_tag.h:26</div></div>
- <div class="ttc" id="grpcpp_2impl_2grpc__library_8h_html"><div class="ttname"><a href="grpcpp_2impl_2grpc__library_8h.html">grpc_library.h</a></div></div>
- <div class="ttc" id="classgrpc_1_1_alarm_html_a4c46dacfd26561470f0901cec2686f49"><div class="ttname"><a href="classgrpc_1_1_alarm.html#a4c46dacfd26561470f0901cec2686f49">grpc::Alarm::operator=</a></div><div class="ttdeci">Alarm & operator=(const Alarm &)=delete</div></div>
- <div class="ttc" id="classgrpc_1_1_grpc_library_codegen_html"><div class="ttname"><a href="classgrpc_1_1_grpc_library_codegen.html">grpc::GrpcLibraryCodegen</a></div><div class="ttdoc">Classes that require gRPC to be initialized should inherit from this class. </div><div class="ttdef"><b>Definition:</b> grpc_library.h:38</div></div>
- <div class="ttc" id="classgrpc_1_1_time_point_html"><div class="ttname"><a href="classgrpc_1_1_time_point.html">grpc::TimePoint</a></div><div class="ttdoc">If you are trying to use CompletionQueue::AsyncNext with a time class that isn&#39;t either gpr_timespec ...</div><div class="ttdef"><b>Definition:</b> time.h:40</div></div>
- <div class="ttc" id="namespacegrpc_html"><div class="ttname"><a href="namespacegrpc.html">grpc</a></div><div class="ttdoc">An Alarm posts the user provided tag to its associated completion queue upon expiry or cancellation...</div><div class="ttdef"><b>Definition:</b> alarm.h:31</div></div>
- <div class="ttc" id="grpcpp_2impl_2codegen_2grpc__library_8h_html"><div class="ttname"><a href="grpcpp_2impl_2codegen_2grpc__library_8h.html">grpc_library.h</a></div></div>
- <div class="ttc" id="grpcpp_2impl_2codegen_2time_8h_html"><div class="ttname"><a href="grpcpp_2impl_2codegen_2time_8h.html">time.h</a></div></div>
- <div class="ttc" id="classgrpc_1_1_completion_queue_html"><div class="ttname"><a href="classgrpc_1_1_completion_queue.html">grpc::CompletionQueue</a></div><div class="ttdoc">A thin wrapper around grpc_completion_queue (see src/core/lib/surface/completion_queue.h). </div><div class="ttdef"><b>Definition:</b> completion_queue.h:94</div></div>
- <div class="ttc" id="classgrpc_1_1_alarm_html_ad75ad87050d7ad9b2f66dbd6ef0da056"><div class="ttname"><a href="classgrpc_1_1_alarm.html#ad75ad87050d7ad9b2f66dbd6ef0da056">grpc::Alarm::Alarm</a></div><div class="ttdeci">Alarm(Alarm &&rhs)</div><div class="ttdoc">Alarms are movable. </div><div class="ttdef"><b>Definition:</b> alarm.h:68</div></div>
- <div class="ttc" id="classgrpc_1_1_alarm_html_a49ce7f2934d753389bd192574c509302"><div class="ttname"><a href="classgrpc_1_1_alarm.html#a49ce7f2934d753389bd192574c509302">grpc::Alarm::Alarm</a></div><div class="ttdeci">Alarm()</div><div class="ttdoc">Create an unset completion queue alarm. </div></div>
- <div class="ttc" id="classgrpc_1_1_alarm_html_a57837c6b6d75f622c056b3050cf000fb"><div class="ttname"><a href="classgrpc_1_1_alarm.html#a57837c6b6d75f622c056b3050cf000fb">grpc::Alarm::Cancel</a></div><div class="ttdeci">void Cancel()</div><div class="ttdoc">Cancel a completion queue alarm. </div></div>
- <div class="ttc" id="grpcpp_2impl_2codegen_2completion__queue__tag_8h_html"><div class="ttname"><a href="grpcpp_2impl_2codegen_2completion__queue__tag_8h.html">completion_queue_tag.h</a></div></div>
- <div class="ttc" id="structgpr__timespec_html"><div class="ttname"><a href="structgpr__timespec.html">gpr_timespec</a></div><div class="ttdoc">Analogous to struct timespec. </div><div class="ttdef"><b>Definition:</b> gpr_types.h:47</div></div>
- <div class="ttc" id="grpc_8h_html"><div class="ttname"><a href="grpc_8h.html">grpc.h</a></div></div>
- <div class="ttc" id="classgrpc_1_1_alarm_html_a47545b12ace3607ed259225e38eade46"><div class="ttname"><a href="classgrpc_1_1_alarm.html#a47545b12ace3607ed259225e38eade46">grpc::Alarm::operator=</a></div><div class="ttdeci">Alarm & operator=(Alarm &&rhs)</div><div class="ttdef"><b>Definition:</b> alarm.h:69</div></div>
- <div class="ttc" id="classgrpc_1_1_alarm_html_ab78846507ce33312823afcebe78a1215"><div class="ttname"><a href="classgrpc_1_1_alarm.html#ab78846507ce33312823afcebe78a1215">grpc::Alarm::~Alarm</a></div><div class="ttdeci">~Alarm()</div><div class="ttdoc">Destroy the given completion queue alarm, cancelling it in the process. </div></div>
- </div><!-- fragment --></div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated on Tue May 15 2018 17:01:01 for GRPC C++ by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.13
- </small></address>
- </body>
- </html>
|