blob: a20d2d30e4b07401bfb164b305696cf32d993860 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<META NAME="ROBOTS" CONTENT="NOINDEX">
<link rel="canonical" href="https://ignite.apache.org/releases/1.6.0/javadoc/org/apache/ignite/IgniteCondition.html" />
<!-- Generated by javadoc (version 1.7.0_80) on Wed May 18 17:03:55 MSK 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IgniteCondition (Ignite 1.6.0)</title>
<meta name="date" content="2016-05-18">
<link rel="stylesheet" type="text/css" href="../../../javadoc.css" title="Style">
<script>
(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','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-61232409-1', 'auto');
ga('send', 'pageview');
</script></head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="IgniteCondition (Ignite 1.6.0)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/IgniteCondition.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>Ignite - In-Memory Data Fabric</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/ignite/IgniteCompute.html" title="interface in org.apache.ignite"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/apache/ignite/IgniteCountDownLatch.html" title="interface in org.apache.ignite"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/ignite/IgniteCondition.html" target="_top">Frames</a></li>
<li><a href="IgniteCondition.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.ignite</div>
<h2 title="Interface IgniteCondition" class="title">Interface IgniteCondition</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true" title="class or interface in java.util.concurrent.locks">Condition</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">IgniteCondition</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true" title="class or interface in java.util.concurrent.locks">Condition</a></pre>
<div class="block">This interface provides a rich API for working with condition objects
associated with distributed reentrant locks.
<p>
<h1 class="header">Functionality</h1>
IgniteCondition provides functionality similar to <code>java.util.concurrent.locks.Condition</code>.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteCondition.html#await()">await</a></strong>()</code>
<div class="block">Causes the current thread to wait until it is signalled or
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html?is-external=true#interrupt()" title="class or interface in java.lang">interrupted</a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteCondition.html#await(long,%20java.util.concurrent.TimeUnit)">await</a></strong>(long&nbsp;time,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a>&nbsp;unit)</code>
<div class="block">Causes the current thread to wait until it is signalled or interrupted,
or the specified waiting time elapses.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteCondition.html#awaitNanos(long)">awaitNanos</a></strong>(long&nbsp;nanosTimeout)</code>
<div class="block">Causes the current thread to wait until it is signalled or interrupted,
or the specified waiting time elapses.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteCondition.html#awaitUninterruptibly()">awaitUninterruptibly</a></strong>()</code>
<div class="block">Causes the current thread to wait until it is signalled.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteCondition.html#awaitUntil(java.util.Date)">awaitUntil</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;deadline)</code>
<div class="block">Causes the current thread to wait until it is signalled or interrupted,
or the specified deadline elapses.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteCondition.html#name()">name</a></strong>()</code>
<div class="block">Name of ignite condition.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteCondition.html#signal()">signal</a></strong>()</code>
<div class="block">Wakes up one waiting thread.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteCondition.html#signalAll()">signalAll</a></strong>()</code>
<div class="block">Wakes up all waiting threads.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="name()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>name</h4>
<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name()</pre>
<div class="block">Name of ignite condition.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Name of ignite condition.</dd></dl>
</li>
</ul>
<a name="await()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>await</h4>
<pre>void&nbsp;await()
throws <a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a>,
<a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Causes the current thread to wait until it is signalled or
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html?is-external=true#interrupt()" title="class or interface in java.lang">interrupted</a>.
<p>The lock associated with this <code>IgniteCondition</code> is atomically
released and the current thread becomes disabled for thread scheduling
purposes and lies dormant until <em>one</em> of six things happens:
<ul>
<li>Some other thread (on any node) invokes the <a href="../../../org/apache/ignite/IgniteCondition.html#signal()"><code>signal()</code></a> method for this
<code>Condition</code> and the current thread happens to be chosen as the
thread to be awakened; or
<li>Some other thread (on any node) invokes the <a href="../../../org/apache/ignite/IgniteCondition.html#signalAll()"><code>signalAll()</code></a> method for this
<code>Condition</code>; or
<li>Some other thread <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html?is-external=true#interrupt()" title="class or interface in java.lang">interrupts</a> the
current thread, and interruption of thread suspension is supported; or
<li>Some other node in grid fails, and lock is created in non-failoverSafe mode; or
<li>Local node is stopped; or
<li>A &quot;<em>spurious wakeup</em>&quot; occurs.
</ul>
<p>If lock is not broken (because of failure of lock owner node)
in non-failoverSafe mode and local node is alive,
before this method can return the current thread must
re-acquire the lock associated with this condition. In all other cases
when the thread returns it is <em>guaranteed</em> to hold this lock.
<p>If the current thread:
<ul>
<li>has its interrupted status set on entry to this method; or
<li>is <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html?is-external=true#interrupt()" title="class or interface in java.lang">interrupted</a> while waiting
and interruption of thread suspension is supported,
</ul>
then <a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite"><code>IgniteInterruptedException</code></a> is thrown and the current thread's
interrupted status is cleared. It is not specified, in the first
case, whether or not the test for interruption occurs before the lock
is released.
<p><b>Implementation Considerations</b>
<p>The current thread is assumed to hold the lock associated with this
<code>Condition</code> when this method is called. If not, an <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalMonitorStateException.html?is-external=true" title="class or interface in java.lang"><code>IllegalMonitorStateException</code></a>
will be thrown.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true#await()" title="class or interface in java.util.concurrent.locks">await</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true" title="class or interface in java.util.concurrent.locks">Condition</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a></code> - if the current thread is interrupted</dd>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - if the node stopped, or
node owning the lock failed in non-failoversafe mode</dd></dl>
</li>
</ul>
<a name="awaitUninterruptibly()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>awaitUninterruptibly</h4>
<pre>void&nbsp;awaitUninterruptibly()
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Causes the current thread to wait until it is signalled.
<p>The lock associated with this condition is atomically
released and the current thread becomes disabled for thread scheduling
purposes and lies dormant until <em>one</em> of five things happens:
<ul>
<li>Some other thread invokes the <a href="../../../org/apache/ignite/IgniteCondition.html#signal()"><code>signal()</code></a> method for this
<code>Condition</code> and the current thread happens to be chosen as the
thread to be awakened; or
<li>Some other thread invokes the <a href="../../../org/apache/ignite/IgniteCondition.html#signalAll()"><code>signalAll()</code></a> method for this
<code>Condition</code>; or
<li>Some other node in grid fails, and lock is created in non-failoverSafe mode; or
<li>Local node is stopped; or
<li>A &quot;<em>spurious wakeup</em>&quot; occurs.
</ul>
<p>If lock is not broken (because of failure of lock owner node)
in non-failoverSafe mode and local node is alive,
before this method can return the current thread must
re-acquire the lock associated with this condition. In all other cases,
when the thread returns it is <em>guaranteed</em> to hold this lock.
<p>If the current thread's interrupted status is set when it enters
this method, or it is <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html?is-external=true#interrupt()" title="class or interface in java.lang">interrupted</a>
while waiting, it will continue to wait until signalled. When it finally
returns from this method its interrupted status will still
be set.
<p><b>Implementation Considerations</b>
<p>The current thread is assumed to hold the lock associated with this
<code>Condition</code> when this method is called. If not, an <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalMonitorStateException.html?is-external=true" title="class or interface in java.lang"><code>IllegalMonitorStateException</code></a>
will be thrown.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true#awaitUninterruptibly()" title="class or interface in java.util.concurrent.locks">awaitUninterruptibly</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true" title="class or interface in java.util.concurrent.locks">Condition</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - if the node stopped, or
node owning the lock failed in non-failoversafe mode</dd></dl>
</li>
</ul>
<a name="awaitNanos(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>awaitNanos</h4>
<pre>long&nbsp;awaitNanos(long&nbsp;nanosTimeout)
throws <a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a>,
<a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Causes the current thread to wait until it is signalled or interrupted,
or the specified waiting time elapses.
<p>The lock associated with this condition is atomically
released and the current thread becomes disabled for thread scheduling
purposes and lies dormant until <em>one</em> of seven things happens:
<ul>
<li>Some other thread invokes the <a href="../../../org/apache/ignite/IgniteCondition.html#signal()"><code>signal()</code></a> method for this
<code>Condition</code> and the current thread happens to be chosen as the
thread to be awakened; or
<li>Some other thread invokes the <a href="../../../org/apache/ignite/IgniteCondition.html#signalAll()"><code>signalAll()</code></a> method for this
<code>Condition</code>; or
<li>Some other thread <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html?is-external=true#interrupt()" title="class or interface in java.lang">interrupts</a> the
current thread, and interruption of thread suspension is supported; or
<li>The specified waiting time elapses; or
<li>Some other node in grid fails, and lock is created in non-failoverSafe mode; or
<li>Local node is stopped; or
<li>A &quot;<em>spurious wakeup</em>&quot; occurs.
</ul>
<p>If lock is not broken (because of failure of lock owner node)
in non-failoverSafe mode and local node is alive,
before this method can return the current thread must
re-acquire the lock associated with this condition. When the
thread returns it is <em>guaranteed</em> to hold this lock.
<p>If the current thread:
<ul>
<li>has its interrupted status set on entry to this method; or
<li>is <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html?is-external=true#interrupt()" title="class or interface in java.lang">interrupted</a> while waiting
and interruption of thread suspension is supported,
</ul>
then <a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite"><code>IgniteInterruptedException</code></a> is thrown and the current thread's
interrupted status is cleared. It is not specified, in the first
case, whether or not the test for interruption occurs before the lock
is released.
<p>The method returns an estimate of the number of nanoseconds
remaining to wait given the supplied <code>nanosTimeout</code>
value upon return, or a value less than or equal to zero if it
timed out. This value can be used to determine whether and how
long to re-wait in cases where the wait returns but an awaited
condition still does not hold. Typical uses of this method take
the following form:
<pre> <code>boolean aMethod(long timeout, TimeUnit unit) {
long nanos = unit.toNanos(timeout);
lock.lock();
try {
while (!conditionBeingWaitedFor()) {
if (nanos &lt;= 0L)
return false;
nanos = theCondition.awaitNanos(nanos);
}
// ...
} finally {
lock.unlock();
}
}</code></pre>
<p>Design note: This method requires a nanosecond argument so
as to avoid truncation errors in reporting remaining times.
Such precision loss would make it difficult for programmers to
ensure that total waiting times are not systematically shorter
than specified when re-waits occur.
<p><b>Implementation Considerations</b>
<p>The current thread is assumed to hold the lock associated with this
<code>Condition</code> when this method is called. If not, an <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalMonitorStateException.html?is-external=true" title="class or interface in java.lang"><code>IllegalMonitorStateException</code></a>
will be thrown.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true#awaitNanos(long)" title="class or interface in java.util.concurrent.locks">awaitNanos</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true" title="class or interface in java.util.concurrent.locks">Condition</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>nanosTimeout</code> - the maximum time to wait, in nanoseconds</dd>
<dt><span class="strong">Returns:</span></dt><dd>an estimate of the <code>nanosTimeout</code> value minus
the time spent waiting upon return from this method.
A positive value may be used as the argument to a
subsequent call to this method to finish waiting out
the desired time. A value less than or equal to zero
indicates that no time remains.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a></code> - if the current thread is interrupted</dd>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - if the node stopped, or
node owning the lock failed in non-failoversafe mode</dd></dl>
</li>
</ul>
<a name="await(long, java.util.concurrent.TimeUnit)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>await</h4>
<pre>boolean&nbsp;await(long&nbsp;time,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a>&nbsp;unit)
throws <a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a>,
<a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Causes the current thread to wait until it is signalled or interrupted,
or the specified waiting time elapses. This method is behaviorally
equivalent to:
<pre> <code>awaitNanos(unit.toNanos(time)) &gt; 0</code></pre></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true#await(long,%20java.util.concurrent.TimeUnit)" title="class or interface in java.util.concurrent.locks">await</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true" title="class or interface in java.util.concurrent.locks">Condition</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>time</code> - the maximum time to wait</dd><dd><code>unit</code> - the time unit of the <code>time</code> argument</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>false</code> if the waiting time detectably elapsed
before return from the method, else <code>true</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a></code> - if the current thread is interrupted</dd>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - if the node stopped, or
node owning the lock failed in non-failoversafe mode</dd></dl>
</li>
</ul>
<a name="awaitUntil(java.util.Date)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>awaitUntil</h4>
<pre>boolean&nbsp;awaitUntil(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</a>&nbsp;deadline)
throws <a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a>,
<a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Causes the current thread to wait until it is signalled or interrupted,
or the specified deadline elapses.
<p>The lock associated with this condition is atomically
released and the current thread becomes disabled for thread scheduling
purposes and lies dormant until <em>one</em> of seven things happens:
<ul>
<li>Some other thread invokes the <a href="../../../org/apache/ignite/IgniteCondition.html#signal()"><code>signal()</code></a> method for this
<code>Condition</code> and the current thread happens to be chosen as the
thread to be awakened; or
<li>Some other thread invokes the <a href="../../../org/apache/ignite/IgniteCondition.html#signalAll()"><code>signalAll()</code></a> method for this
<code>Condition</code>; or
<li>Some other thread <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html?is-external=true#interrupt()" title="class or interface in java.lang">interrupts</a> the
current thread, and interruption of thread suspension is supported; or
<li>Some other node in grid fails, and lock is created in non-failoverSafe mode; or
<li>Local node is stopped; or
<li>The specified deadline elapses; or
<li>A &quot;<em>spurious wakeup</em>&quot; occurs.
</ul>
<p>If lock is not broken (because of failure of lock owner node)
in non-failoverSafe mode and local node is alive,
before this method can return the current thread must
re-acquire the lock associated with this condition. When the
thread returns it is <em>guaranteed</em> to hold this lock.
<p>If the current thread:
<ul>
<li>has its interrupted status set on entry to this method; or
<li>is <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html?is-external=true#interrupt()" title="class or interface in java.lang">interrupted</a> while waiting
and interruption of thread suspension is supported,
</ul>
then <a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite"><code>IgniteInterruptedException</code></a> is thrown and the current thread's
interrupted status is cleared. It is not specified, in the first
case, whether or not the test for interruption occurs before the lock
is released.
<p>The return value indicates whether the deadline has elapsed,
which can be used as follows:
<pre> <code>boolean aMethod(Date deadline) {
boolean stillWaiting = true;
lock.lock();
try {
while (!conditionBeingWaitedFor()) {
if (!stillWaiting)
return false;
stillWaiting = theCondition.awaitUntil(deadline);
}
// ...
} finally {
lock.unlock();
}
}</code></pre>
<p><b>Implementation Considerations</b>
<p>The current thread is assumed to hold the lock associated with this
<code>Condition</code> when this method is called. If not, an <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalMonitorStateException.html?is-external=true" title="class or interface in java.lang"><code>IllegalMonitorStateException</code></a>
will be thrown.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true#awaitUntil(java.util.Date)" title="class or interface in java.util.concurrent.locks">awaitUntil</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true" title="class or interface in java.util.concurrent.locks">Condition</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>deadline</code> - the absolute time to wait until</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>false</code> if the deadline has elapsed upon return, else
<code>true</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a></code> - if the current thread is interrupted
(and interruption of thread suspension is supported)</dd>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - if the node stopped, or
node owning the lock failed in non-failoversafe mode</dd></dl>
</li>
</ul>
<a name="signal()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>signal</h4>
<pre>void&nbsp;signal()
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Wakes up one waiting thread.
<p>If any threads are waiting on this condition then one
is selected for waking up. That thread must then re-acquire the
lock before returning from <code>await</code>.
<p><b>Implementation Considerations</b>
<p>The current thread is assumed to hold the lock associated with this
<code>Condition</code> when this method is called. If not, an <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalMonitorStateException.html?is-external=true" title="class or interface in java.lang"><code>IllegalMonitorStateException</code></a>
will be thrown.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true#signal()" title="class or interface in java.util.concurrent.locks">signal</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true" title="class or interface in java.util.concurrent.locks">Condition</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - if node is stopped or
node owning the lock failed in non-failoversafe mode</dd></dl>
</li>
</ul>
<a name="signalAll()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>signalAll</h4>
<pre>void&nbsp;signalAll()
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Wakes up all waiting threads.
<p>If any threads are waiting on this condition then they are
all woken up. Each thread must re-acquire the lock before it can
return from <code>await</code>.
<p><b>Implementation Considerations</b>
<p>The current thread is assumed to hold the lock associated with this
<code>Condition</code> when this method is called. If not, an <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalMonitorStateException.html?is-external=true" title="class or interface in java.lang"><code>IllegalMonitorStateException</code></a>
will be thrown.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true#signalAll()" title="class or interface in java.util.concurrent.locks">signalAll</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html?is-external=true" title="class or interface in java.util.concurrent.locks">Condition</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></code> - if node is stopped or
node owning the lock failed in non-failoversafe mode</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/IgniteCondition.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>Ignite - In-Memory Data Fabric</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/ignite/IgniteCompute.html" title="interface in org.apache.ignite"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/apache/ignite/IgniteCountDownLatch.html" title="interface in org.apache.ignite"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/ignite/IgniteCondition.html" target="_top">Frames</a></li>
<li><a href="IgniteCondition.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><table width="100%" border="0" cellspacing=0 cellpadding=0 style="padding: 5px"> <tr> <td> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <a target=_blank href="https://ignite.apache.org"><nobr>2015 Copyright &#169; Apache Software Foundation</nobr></a> </td> </tr> </tbody> </table> </td> <td width="100%" align="right" valign="center"> <a href="https://twitter.com/ApacheIgnite" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @ApacheIgnite</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> </td> </tr> <tr> <td colspan="2" valign="top" align="left"> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <b>Ignite Fabric</b> </td> <td>:&nbsp;&nbsp; ver. <strong>1.6.0</strong> </td> </tr> <tr style="padding: 0; margin: 0"> <td> <b>Release Date</b> </td> <td>:&nbsp;&nbsp; May 18 2016 </td> </tr> </tbody> </table> </td> </tr> </table></small></p>
</body>
</html>