blob: 272f22a37ea7751729f9fa3fb45400a7c6ec36d3 [file] [log] [blame]
<!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"/>
<title>activemq-cpp-3.4.0: decaf::util::concurrent::CountDownLatch Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">activemq-cpp-3.4.0</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
</ul>
</div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
initNavTree('classdecaf_1_1util_1_1concurrent_1_1_count_down_latch.html','');
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<h1>decaf::util::concurrent::CountDownLatch Class Reference</h1> </div>
</div>
<div class="contents">
<!-- doxytag: class="decaf::util::concurrent::CountDownLatch" -->
<p><code>#include &lt;<a class="el" href="_count_down_latch_8h_source.html">src/main/decaf/util/concurrent/CountDownLatch.h</a>&gt;</code></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_count_down_latch.html#adc5c23b8b07a6073bf3908b54dd9df0a">CountDownLatch</a> (int count)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <a href="#adc5c23b8b07a6073bf3908b54dd9df0a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_count_down_latch.html#a594fd7742cb9329b1dce0a9d8656f866">~CountDownLatch</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_count_down_latch.html#a568418d090dc22667d8f880c2b876c07">await</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Causes the current thread to wait until the latch has counted down to zero, unless the thread is interrupted. <a href="#a568418d090dc22667d8f880c2b876c07"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_count_down_latch.html#afb77e4507ac487124df61d3cdff30fd3">await</a> (long long timeOut)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Causes the current thread to wait until the latch has counted down to zero, unless the thread is interrupted, or the specified waiting time elapses. <a href="#afb77e4507ac487124df61d3cdff30fd3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_count_down_latch.html#a49b225fb90c0f2a737f5dbe615c73d7e">await</a> (long long timeout, const <a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_time_unit.html">TimeUnit</a> &amp;unit)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Causes the current thread to wait until the latch has counted down to zero, unless the thread is interrupted, or the specified waiting time elapses. <a href="#a49b225fb90c0f2a737f5dbe615c73d7e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_count_down_latch.html#a9ca81b51f1351ebf3986bb0e6f41a3ab">countDown</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Counts down the latch, releasing all waiting threads when the count hits zero. <a href="#a9ca81b51f1351ebf3986bb0e6f41a3ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_count_down_latch.html#aa71a025d6e24900f2085f06b404cb2fe">getCount</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the current count. <a href="#aa71a025d6e24900f2085f06b404cb2fe"></a><br/></td></tr>
</table>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="adc5c23b8b07a6073bf3908b54dd9df0a"></a><!-- doxytag: member="decaf::util::concurrent::CountDownLatch::CountDownLatch" ref="adc5c23b8b07a6073bf3908b54dd9df0a" args="(int count)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">decaf::util::concurrent::CountDownLatch::CountDownLatch </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>count</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Constructor. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">count</td><td>- number to count down from. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a594fd7742cb9329b1dce0a9d8656f866"></a><!-- doxytag: member="decaf::util::concurrent::CountDownLatch::~CountDownLatch" ref="a594fd7742cb9329b1dce0a9d8656f866" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual decaf::util::concurrent::CountDownLatch::~CountDownLatch </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a568418d090dc22667d8f880c2b876c07"></a><!-- doxytag: member="decaf::util::concurrent::CountDownLatch::await" ref="a568418d090dc22667d8f880c2b876c07" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void decaf::util::concurrent::CountDownLatch::await </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Causes the current thread to wait until the latch has counted down to zero, unless the thread is interrupted. </p>
<p>If the current count is zero then this method returns immediately.</p>
<p>If the current count is greater than zero then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of two things happen:</p>
<p>* The count reaches zero due to invocations of the <a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_count_down_latch.html#a9ca81b51f1351ebf3986bb0e6f41a3ab" title="Counts down the latch, releasing all waiting threads when the count hits zero.">countDown()</a> method; or * Some other thread interrupts the current thread.</p>
<p>If the current thread:</p>
<p>* has its interrupted status set on entry to this method; or * is interrupted while waiting,</p>
<p>then InterruptedException is thrown and the current thread's interrupted status is cleared.</p>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname">InterruptedException</td><td>- if the current thread is interrupted while waiting. </td></tr>
<tr><td class="paramname">Exception</td><td>- if any other error occurs. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="afb77e4507ac487124df61d3cdff30fd3"></a><!-- doxytag: member="decaf::util::concurrent::CountDownLatch::await" ref="afb77e4507ac487124df61d3cdff30fd3" args="(long long timeOut)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool decaf::util::concurrent::CountDownLatch::await </td>
<td>(</td>
<td class="paramtype">long long&#160;</td>
<td class="paramname"><em>timeOut</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Causes the current thread to wait until the latch has counted down to zero, unless the thread is interrupted, or the specified waiting time elapses. </p>
<p>If the current count is zero then this method returns immediately with the value true.</p>
<p>If the current count is greater than zero then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of three things happen:</p>
<p>* The count reaches zero due to invocations of the <a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_count_down_latch.html#a9ca81b51f1351ebf3986bb0e6f41a3ab" title="Counts down the latch, releasing all waiting threads when the count hits zero.">countDown()</a> method; or * Some other thread interrupts the current thread; or * The specified waiting time elapses.</p>
<p>If the count reaches zero then the method returns with the value true.</p>
<p>If the current thread:</p>
<p>* has its interrupted status set on entry to this method; or * is interrupted while waiting,</p>
<p>then InterruptedException is thrown and the current thread's interrupted status is cleared.</p>
<p>If the specified waiting time elapses then the value false is returned. If the time is less than or equal to zero, the method will not wait at all.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">timeout</td><td>- Time in milliseconds to wait for the count to reach zero.</td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname">InterruptedException</td><td>- if the current thread is interrupted while waiting. </td></tr>
<tr><td class="paramname">Exception</td><td>- if any other error occurs. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a49b225fb90c0f2a737f5dbe615c73d7e"></a><!-- doxytag: member="decaf::util::concurrent::CountDownLatch::await" ref="a49b225fb90c0f2a737f5dbe615c73d7e" args="(long long timeout, const TimeUnit &amp;unit)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual bool decaf::util::concurrent::CountDownLatch::await </td>
<td>(</td>
<td class="paramtype">long long&#160;</td>
<td class="paramname"><em>timeout</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_time_unit.html">TimeUnit</a> &amp;&#160;</td>
<td class="paramname"><em>unit</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Causes the current thread to wait until the latch has counted down to zero, unless the thread is interrupted, or the specified waiting time elapses. </p>
<p>If the current count is zero then this method returns immediately with the value true.</p>
<p>If the current count is greater than zero then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of three things happen:</p>
<p>* The count reaches zero due to invocations of the <a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_count_down_latch.html#a9ca81b51f1351ebf3986bb0e6f41a3ab" title="Counts down the latch, releasing all waiting threads when the count hits zero.">countDown()</a> method; or * Some other thread interrupts the current thread; or * The specified waiting time elapses.</p>
<p>If the count reaches zero then the method returns with the value true.</p>
<p>If the current thread:</p>
<p>* has its interrupted status set on entry to this method; or * is interrupted while waiting,</p>
<p>then InterruptedException is thrown and the current thread's interrupted status is cleared.</p>
<p>If the specified waiting time elapses then the value false is returned. If the time is less than or equal to zero, the method will not wait at all.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">timeout</td><td>- Time to wait for the count to reach zero. </td></tr>
<tr><td class="paramname">unit</td><td>- The units that the timeout specifies.</td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Exceptions:</b></dt><dd>
<table class="exception">
<tr><td class="paramname">InterruptedException</td><td>- if the current thread is interrupted while waiting. </td></tr>
<tr><td class="paramname">Exception</td><td>- if any other error occurs. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a9ca81b51f1351ebf3986bb0e6f41a3ab"></a><!-- doxytag: member="decaf::util::concurrent::CountDownLatch::countDown" ref="a9ca81b51f1351ebf3986bb0e6f41a3ab" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void decaf::util::concurrent::CountDownLatch::countDown </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Counts down the latch, releasing all waiting threads when the count hits zero. </p>
</div>
</div>
<a class="anchor" id="aa71a025d6e24900f2085f06b404cb2fe"></a><!-- doxytag: member="decaf::util::concurrent::CountDownLatch::getCount" ref="aa71a025d6e24900f2085f06b404cb2fe" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual int decaf::util::concurrent::CountDownLatch::getCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the current count. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>int count value </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/main/decaf/util/concurrent/<a class="el" href="_count_down_latch_8h_source.html">CountDownLatch.h</a></li>
</ul>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacedecaf.html">decaf</a> </li>
<li class="navelem"><a class="el" href="namespacedecaf_1_1util.html">util</a> </li>
<li class="navelem"><a class="el" href="namespacedecaf_1_1util_1_1concurrent.html">concurrent</a> </li>
<li class="navelem"><a class="el" href="classdecaf_1_1util_1_1concurrent_1_1_count_down_latch.html">CountDownLatch</a> </li>
<li class="footer">Generated on Mon Apr 25 2011 for activemq-cpp-3.4.0 by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
</ul>
</div>
</body>
</html>