blob: ee6135bf43db5a3bcab0ce5e0c97a9053d0fb7d4 [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>
<link rel="canonical" href="https://ignite.apache.org/releases/2.10.0/javadoc/org/apache/ignite/IgniteCondition.html" />
<META NAME="ROBOTS" CONTENT="NOINDEX">
<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
ym(72949126, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/72949126" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
<script type='text/javascript'>
window.__lo_site_id = 284467;
(function() {
var wa = document.createElement('script'); wa.type = 'text/javascript'; wa.async = true;
wa.src = 'https://d10lpsik1i8c69.cloudfront.net/w.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wa, s);
})();
</script>
<!-- Generated by javadoc (1.8.0_261) on Thu Mar 11 02:15:42 MSK 2021 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IgniteCondition (Ignite 2.10.0)</title>
<meta name="date" content="2021-03-11">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<link rel='shortcut icon' href='https://ignite.apache.org/favicon.ico'/>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-61232409-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-61232409-1');
</script></head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="IgniteCondition (Ignite 2.10.0)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/ignite/IgniteCompute.html" title="interface in org.apache.ignite"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../org/apache/ignite/IgniteCountDownLatch.html" title="interface in org.apache.ignite"><span class="typeNameLink">Next&nbsp;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&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;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="https://docs.oracle.com/javase/8/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="typeNameLabel">IgniteCondition</span>
extends <a href="https://docs.oracle.com/javase/8/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="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteCondition.html#await--">await</a></span>()</code>
<div class="block">Causes the current thread to wait until it is signalled or
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#interrupt--" title="class or interface in java.lang">interrupted</a>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteCondition.html#await-long-java.util.concurrent.TimeUnit-">await</a></span>(long&nbsp;time,
<a href="https://docs.oracle.com/javase/8/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 id="i2" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteCondition.html#awaitNanos-long-">awaitNanos</a></span>(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 id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteCondition.html#awaitUninterruptibly--">awaitUninterruptibly</a></span>()</code>
<div class="block">Causes the current thread to wait until it is signalled.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteCondition.html#awaitUntil-java.util.Date-">awaitUntil</a></span>(<a href="https://docs.oracle.com/javase/8/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 id="i5" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteCondition.html#name--">name</a></span>()</code>
<div class="block">Name of ignite condition.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteCondition.html#signal--">signal</a></span>()</code>
<div class="block">Wakes up one waiting thread.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteCondition.html#signalAll--">signalAll</a></span>()</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="https://docs.oracle.com/javase/8/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="returnLabel">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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="throwsLabel">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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="throwsLabel">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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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 <span class='angle_bracket'>&lt;</span>= 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="https://docs.oracle.com/javase/8/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><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="paramLabel">Parameters:</span></dt>
<dd><code>nanosTimeout</code> - the maximum time to wait, in nanoseconds</dd>
<dt><span class="returnLabel">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="throwsLabel">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="https://docs.oracle.com/javase/8/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)) <span class='angle_bracket'>&gt;</span> 0</code></pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/Condition.html?is-external=true#await-long-java.util.concurrent.TimeUnit-" title="class or interface in java.util.concurrent.locks">await</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/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="paramLabel">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="returnLabel">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="throwsLabel">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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="paramLabel">Parameters:</span></dt>
<dd><code>deadline</code> - the absolute time to wait until</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>false</code> if the deadline has elapsed upon return, else
<code>true</code></dd>
<dt><span class="throwsLabel">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="https://docs.oracle.com/javase/8/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><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="throwsLabel">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="https://docs.oracle.com/javase/8/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><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="throwsLabel">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>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/ignite/IgniteCompute.html" title="interface in org.apache.ignite"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../org/apache/ignite/IgniteCountDownLatch.html" title="interface in org.apache.ignite"><span class="typeNameLink">Next&nbsp;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&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;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>2021 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> </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 Database and Caching Platform</b> </td> <td>:&nbsp;&nbsp; ver. <strong>2.10.0</strong> </td> </tr> <tr style="padding: 0; margin: 0"> <td> <b>Release Date</b> </td> <td>:&nbsp;&nbsp; March 10 2021 </td> </tr> </tbody> </table> </td> </tr> </table></small></p>
</body>
</html>