blob: 98cce777cd691293db5468648802bb198d2a77b3 [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.0.0-rc3/javadoc/org/apache/ignite/IgniteEvents.html" />
<!-- Generated by javadoc (version 1.7.0_21) on Tue Mar 24 10:27:29 MSK 2015 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>IgniteEvents (Ignite 1.0.0-RC3)</title>
<meta name="date" content="2015-03-24">
<link rel="stylesheet" type="text/css" href="../../../javadoc.css" title="Style">
<link rel='shortcut icon' href='http://gridgain.com/wp-content/uploads/2014/09/favicon.ico'/>
<link type='text/css' rel='stylesheet' href='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shCore.css'/>
<link type='text/css' rel='stylesheet' href='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shThemeDefault.css'/>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shCore.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shLegacy.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushJava.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushPlain.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushJScript.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushBash.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushXml.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushScala.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushGroovy.js'></script>
<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="IgniteEvents (Ignite 1.0.0-RC3)";
}
//-->
</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/IgniteEvents.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>Apache Ignite - In-Memory Data Fabric</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/ignite/IgniteDeploymentException.html" title="class in org.apache.ignite"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/ignite/IgniteEvents.html" target="_top">Frames</a></li>
<li><a href="IgniteEvents.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 IgniteEvents" class="title">Interface IgniteEvents</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../../org/apache/ignite/lang/IgniteAsyncSupport.html" title="interface in org.apache.ignite.lang">IgniteAsyncSupport</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">IgniteEvents</span>
extends <a href="../../../org/apache/ignite/lang/IgniteAsyncSupport.html" title="interface in org.apache.ignite.lang">IgniteAsyncSupport</a></pre>
<div class="block">Provides functionality for local and remote event notifications on nodes defined by <a href="../../../org/apache/ignite/IgniteEvents.html#clusterGroup()"><code>clusterGroup()</code></a>.
There are <code>2</code> ways to subscribe to event listening, <code>local</code> and <code>remote</code>. Instance
of <code>GridMessaging</code> is obtained from grid projection as follows:
<pre name="code" class="java">
GridEvents evts = Ignition.ignite().events();
</pre> * <p>
Local subscription, defined by <a href="../../../org/apache/ignite/IgniteEvents.html#localListen(org.apache.ignite.lang.IgnitePredicate, int...)"><code>localListen(IgnitePredicate, int...)</code></a> method, will add
a listener for specified events on local node only. This listener will be notified whenever any
of subscribed events happen on local node regardless of whether local node belongs to underlying
grid projection or not.
<p>
Remote subscription, defined by <a href="../../../org/apache/ignite/IgniteEvents.html#remoteListen(org.apache.ignite.lang.IgniteBiPredicate, org.apache.ignite.lang.IgnitePredicate, int...)"><code>remoteListen(IgniteBiPredicate, IgnitePredicate, int...)</code></a>, will add an
event listener for specified events on all nodes in the projection (possibly including local node if
it belongs to the projection as well). All projection nodes will then be notified of the subscribed events.
If the events pass the remote event filter, the events will be sent to local node for local listener notification.
<p>
Note that by default, all events in Ignite are disabled for performance reasons. You must only enable
events that you need within your logic. You can enable/disable events either by calling <a href="../../../org/apache/ignite/IgniteEvents.html#enableLocal(int...)"><code>enableLocal(int...)</code></a>
or <a href="../../../org/apache/ignite/IgniteEvents.html#disableLocal(int...)"><code>disableLocal(int...)</code></a> methods, or from XML configuration.
For example, you can enable all cache events as follows:
<pre name="code" class="xml">
&lt;property name="includeEventTypes"&gt;
&lt;util:constant static-field="org.apache.ignite.events.IgniteEventType.EVTS_CACHE"/&gt;
&lt;/property&gt;
</pre></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><a href="../../../org/apache/ignite/cluster/ClusterGroup.html" title="interface in org.apache.ignite.cluster">ClusterGroup</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#clusterGroup()">clusterGroup</a></strong>()</code>
<div class="block">Gets grid projection to which this <code>GridMessaging</code> instance belongs.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#disableLocal(int...)">disableLocal</a></strong>(int...&nbsp;types)</code>
<div class="block">Disables provided events.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int[]</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#enabledEvents()">enabledEvents</a></strong>()</code>
<div class="block">Gets types of enabled events.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#enableLocal(int...)">enableLocal</a></strong>(int...&nbsp;types)</code>
<div class="block">Enables provided events.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#isEnabled(int)">isEnabled</a></strong>(int&nbsp;type)</code>
<div class="block">Check if event is enabled.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#localListen(org.apache.ignite.lang.IgnitePredicate, int...)">localListen</a></strong>(<a href="../../../org/apache/ignite/lang/IgnitePredicate.html" title="interface in org.apache.ignite.lang">IgnitePredicate</a><span class='angle_bracket'>&lt;</span>? extends <a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a><span class='angle_bracket'>&gt;</span>&nbsp;lsnr,
int...&nbsp;types)</code>
<div class="block">Adds an event listener for local events.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><span class='angle_bracket'>&lt;</span>T extends <a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a><span class='angle_bracket'>&gt;</span>&nbsp;<br><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#localQuery(org.apache.ignite.lang.IgnitePredicate, int...)">localQuery</a></strong>(<a href="../../../org/apache/ignite/lang/IgnitePredicate.html" title="interface in org.apache.ignite.lang">IgnitePredicate</a><span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;p,
int...&nbsp;types)</code>
<div class="block">Queries local node for events using passed-in predicate filter for event selection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#recordLocal(org.apache.ignite.events.Event)">recordLocal</a></strong>(<a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a>&nbsp;evt)</code>
<div class="block">Records customer user generated event.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><span class='angle_bracket'>&lt;</span>T extends <a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a><span class='angle_bracket'>&gt;</span>&nbsp;<br><a href="http://docs.oracle.com/javase/7/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#remoteListen(org.apache.ignite.lang.IgniteBiPredicate, org.apache.ignite.lang.IgnitePredicate, int...)">remoteListen</a></strong>(<a href="../../../org/apache/ignite/lang/IgniteBiPredicate.html" title="interface in org.apache.ignite.lang">IgniteBiPredicate</a><span class='angle_bracket'>&lt;</span><a href="http://docs.oracle.com/javase/7/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>,T<span class='angle_bracket'>&gt;</span>&nbsp;locLsnr,
<a href="../../../org/apache/ignite/lang/IgnitePredicate.html" title="interface in org.apache.ignite.lang">IgnitePredicate</a><span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;rmtFilter,
int...&nbsp;types)</code>
<div class="block">Adds event listener for specified events to all nodes in the projection (possibly including
local node if it belongs to the projection as well).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><span class='angle_bracket'>&lt;</span>T extends <a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a><span class='angle_bracket'>&gt;</span>&nbsp;<br><a href="http://docs.oracle.com/javase/7/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#remoteListen(int, long, boolean, org.apache.ignite.lang.IgniteBiPredicate, org.apache.ignite.lang.IgnitePredicate, int...)">remoteListen</a></strong>(int&nbsp;bufSize,
long&nbsp;interval,
boolean&nbsp;autoUnsubscribe,
<a href="../../../org/apache/ignite/lang/IgniteBiPredicate.html" title="interface in org.apache.ignite.lang">IgniteBiPredicate</a><span class='angle_bracket'>&lt;</span><a href="http://docs.oracle.com/javase/7/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>,T<span class='angle_bracket'>&gt;</span>&nbsp;locLsnr,
<a href="../../../org/apache/ignite/lang/IgnitePredicate.html" title="interface in org.apache.ignite.lang">IgnitePredicate</a><span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;rmtFilter,
int...&nbsp;types)</code>
<div class="block">Adds event listener for specified events to all nodes in the projection (possibly including
local node if it belongs to the projection as well).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><span class='angle_bracket'>&lt;</span>T extends <a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a><span class='angle_bracket'>&gt;</span>&nbsp;<br><a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#remoteQuery(org.apache.ignite.lang.IgnitePredicate, long, int...)">remoteQuery</a></strong>(<a href="../../../org/apache/ignite/lang/IgnitePredicate.html" title="interface in org.apache.ignite.lang">IgnitePredicate</a><span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;p,
long&nbsp;timeout,
int...&nbsp;types)</code>
<div class="block">Queries nodes in this projection for events using passed in predicate filter for event
selection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#stopLocalListen(org.apache.ignite.lang.IgnitePredicate, int...)">stopLocalListen</a></strong>(<a href="../../../org/apache/ignite/lang/IgnitePredicate.html" title="interface in org.apache.ignite.lang">IgnitePredicate</a><span class='angle_bracket'>&lt;</span>? extends <a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a><span class='angle_bracket'>&gt;</span>&nbsp;lsnr,
int...&nbsp;types)</code>
<div class="block">Removes local event listener.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#stopRemoteListen(java.util.UUID)">stopRemoteListen</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>&nbsp;opId)</code>
<div class="block">Stops listening to remote events.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><span class='angle_bracket'>&lt;</span>T extends <a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a><span class='angle_bracket'>&gt;</span>&nbsp;<br>T</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#waitForLocal(org.apache.ignite.lang.IgnitePredicate, int...)">waitForLocal</a></strong>(<a href="../../../org/apache/ignite/lang/IgnitePredicate.html" title="interface in org.apache.ignite.lang">IgnitePredicate</a><span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;filter,
int...&nbsp;types)</code>
<div class="block">Waits for the specified events.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../org/apache/ignite/IgniteEvents.html" title="interface in org.apache.ignite">IgniteEvents</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteEvents.html#withAsync()">withAsync</a></strong>()</code>
<div class="block">Gets component with asynchronous mode enabled.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.ignite.lang.IgniteAsyncSupport">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.ignite.lang.<a href="../../../org/apache/ignite/lang/IgniteAsyncSupport.html" title="interface in org.apache.ignite.lang">IgniteAsyncSupport</a></h3>
<code><a href="../../../org/apache/ignite/lang/IgniteAsyncSupport.html#future()">future</a>, <a href="../../../org/apache/ignite/lang/IgniteAsyncSupport.html#isAsync()">isAsync</a></code></li>
</ul>
</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="clusterGroup()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clusterGroup</h4>
<pre><a href="../../../org/apache/ignite/cluster/ClusterGroup.html" title="interface in org.apache.ignite.cluster">ClusterGroup</a>&nbsp;clusterGroup()</pre>
<div class="block">Gets grid projection to which this <code>GridMessaging</code> instance belongs.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Grid projection to which this <code>GridMessaging</code> instance belongs.</dd></dl>
</li>
</ul>
<a name="remoteQuery(org.apache.ignite.lang.IgnitePredicate, long, int...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remoteQuery</h4>
<pre><a href="../../../org/apache/ignite/lang/IgniteAsyncSupported.html" title="annotation in org.apache.ignite.lang">@IgniteAsyncSupported</a>
<span class='angle_bracket'>&lt;</span>T extends <a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a><span class='angle_bracket'>&gt;</span>&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;remoteQuery(<a href="../../../org/apache/ignite/lang/IgnitePredicate.html" title="interface in org.apache.ignite.lang">IgnitePredicate</a><span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;p,
long&nbsp;timeout,
@Nullable
int...&nbsp;types)
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Queries nodes in this projection for events using passed in predicate filter for event
selection.
<p>
Supports asynchronous execution (see <a href="../../../org/apache/ignite/lang/IgniteAsyncSupport.html" title="interface in org.apache.ignite.lang"><code>IgniteAsyncSupport</code></a>).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - Predicate filter used to query events on remote nodes.</dd><dd><code>timeout</code> - Maximum time to wait for result, <code>0</code> to wait forever.</dd><dd><code>types</code> - Event types to be queried.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Collection of grid events returned from specified nodes.</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 query failed.</dd></dl>
</li>
</ul>
<a name="remoteListen(org.apache.ignite.lang.IgniteBiPredicate, org.apache.ignite.lang.IgnitePredicate, int...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remoteListen</h4>
<pre><a href="../../../org/apache/ignite/lang/IgniteAsyncSupported.html" title="annotation in org.apache.ignite.lang">@IgniteAsyncSupported</a>
<span class='angle_bracket'>&lt;</span>T extends <a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a><span class='angle_bracket'>&gt;</span>&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>&nbsp;remoteListen(@Nullable
<a href="../../../org/apache/ignite/lang/IgniteBiPredicate.html" title="interface in org.apache.ignite.lang">IgniteBiPredicate</a><span class='angle_bracket'>&lt;</span><a href="http://docs.oracle.com/javase/7/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>,T<span class='angle_bracket'>&gt;</span>&nbsp;locLsnr,
@Nullable
<a href="../../../org/apache/ignite/lang/IgnitePredicate.html" title="interface in org.apache.ignite.lang">IgnitePredicate</a><span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;rmtFilter,
@Nullable
int...&nbsp;types)
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Adds event listener for specified events to all nodes in the projection (possibly including
local node if it belongs to the projection as well). This means that all events occurring on
any node within this grid projection that pass remove filter will be sent to local node for
local listener notification.
<p>
The listener can be unsubscribed automatically if local node stops, if <code>locLsnr</code> callback
returns <code>false</code> or if <a href="../../../org/apache/ignite/IgniteEvents.html#stopRemoteListen(java.util.UUID)"><code>stopRemoteListen(UUID)</code></a> is called.
<p>
Supports asynchronous execution (see <a href="../../../org/apache/ignite/lang/IgniteAsyncSupport.html" title="interface in org.apache.ignite.lang"><code>IgniteAsyncSupport</code></a>).</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - Type of the event.</dd><dt><span class="strong">Parameters:</span></dt><dd><code>locLsnr</code> - Listener callback that is called on local node. If <code>null</code>, this events will be handled
on remote nodes by passed in <code>rmtFilter</code>.</dd><dd><code>rmtFilter</code> - Filter callback that is called on remote node. Only events that pass the remote filter
will be sent to local node. If <code>null</code>, all events of specified types will
be sent to local node. This remote filter can be used to pre-handle events remotely,
before they are passed in to local callback. It will be auto-unsubsribed on the node
where event occurred in case if it returns <code>false</code>.</dd><dd><code>types</code> - Types of events to listen for. If not provided, all events that pass the
provided remote filter will be sent to local node.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>Operation ID</code> that can be passed to <a href="../../../org/apache/ignite/IgniteEvents.html#stopRemoteListen(java.util.UUID)"><code>stopRemoteListen(UUID)</code></a> method to stop listening.</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 failed to add listener.</dd></dl>
</li>
</ul>
<a name="remoteListen(int, long, boolean, org.apache.ignite.lang.IgniteBiPredicate, org.apache.ignite.lang.IgnitePredicate, int...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remoteListen</h4>
<pre><a href="../../../org/apache/ignite/lang/IgniteAsyncSupported.html" title="annotation in org.apache.ignite.lang">@IgniteAsyncSupported</a>
<span class='angle_bracket'>&lt;</span>T extends <a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a><span class='angle_bracket'>&gt;</span>&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>&nbsp;remoteListen(int&nbsp;bufSize,
long&nbsp;interval,
boolean&nbsp;autoUnsubscribe,
@Nullable
<a href="../../../org/apache/ignite/lang/IgniteBiPredicate.html" title="interface in org.apache.ignite.lang">IgniteBiPredicate</a><span class='angle_bracket'>&lt;</span><a href="http://docs.oracle.com/javase/7/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>,T<span class='angle_bracket'>&gt;</span>&nbsp;locLsnr,
@Nullable
<a href="../../../org/apache/ignite/lang/IgnitePredicate.html" title="interface in org.apache.ignite.lang">IgnitePredicate</a><span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;rmtFilter,
@Nullable
int...&nbsp;types)
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Adds event listener for specified events to all nodes in the projection (possibly including
local node if it belongs to the projection as well). This means that all events occurring on
any node within this grid projection that pass remove filter will be sent to local node for
local listener notification.
<p>
Supports asynchronous execution (see <a href="../../../org/apache/ignite/lang/IgniteAsyncSupport.html" title="interface in org.apache.ignite.lang"><code>IgniteAsyncSupport</code></a>).</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - Type of the event.</dd><dt><span class="strong">Parameters:</span></dt><dd><code>bufSize</code> - Remote events buffer size. Events from remote nodes won't be sent until buffer
is full or time interval is exceeded.</dd><dd><code>interval</code> - Maximum time interval after which events from remote node will be sent. Events
from remote nodes won't be sent until buffer is full or time interval is exceeded.</dd><dd><code>autoUnsubscribe</code> - Flag indicating that event listeners on remote nodes should be
automatically unregistered if master node (node that initiated event listening) leaves
topology. If this flag is <code>false</code>, listeners will be unregistered only when
<a href="../../../org/apache/ignite/IgniteEvents.html#stopRemoteListen(java.util.UUID)"><code>stopRemoteListen(UUID)</code></a> method is called, or the <code>'callback (locLsnr)'</code>
passed in returns <code>false</code>.</dd><dd><code>locLsnr</code> - Callback that is called on local node. If this predicate returns <code>true</code>,
the implementation will continue listening to events. Otherwise, events
listening will be stopped and listeners will be unregistered on all nodes
in the projection. If <code>null</code>, this events will be handled on remote nodes by
passed in <code>rmtFilter</code> until local node stops (if <code>'autoUnsubscribe'</code> is <code>true</code>)
or until <a href="../../../org/apache/ignite/IgniteEvents.html#stopRemoteListen(java.util.UUID)"><code>stopRemoteListen(UUID)</code></a> is called.</dd><dd><code>rmtFilter</code> - Filter callback that is called on remote node. Only events that pass the remote filter
will be sent to local node. If <code>null</code>, all events of specified types will
be sent to local node. This remote filter can be used to pre-handle events remotely,
before they are passed in to local callback. It will be auto-unsubsribed on the node
where event occurred in case if it returns <code>false</code>.</dd><dd><code>types</code> - Types of events to listen for. If not provided, all events that pass the
provided remote filter will be sent to local node.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>Operation ID</code> that can be passed to <a href="../../../org/apache/ignite/IgniteEvents.html#stopRemoteListen(java.util.UUID)"><code>stopRemoteListen(UUID)</code></a> method to stop listening.</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 failed to add listener.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/ignite/IgniteEvents.html#stopRemoteListen(java.util.UUID)"><code>stopRemoteListen(UUID)</code></a></dd></dl>
</li>
</ul>
<a name="stopRemoteListen(java.util.UUID)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stopRemoteListen</h4>
<pre><a href="../../../org/apache/ignite/lang/IgniteAsyncSupported.html" title="annotation in org.apache.ignite.lang">@IgniteAsyncSupported</a>
void&nbsp;stopRemoteListen(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>&nbsp;opId)
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Stops listening to remote events. This will unregister all listeners identified with provided
operation ID on all nodes defined by <a href="../../../org/apache/ignite/IgniteEvents.html#clusterGroup()"><code>clusterGroup()</code></a>.
<p>
Supports asynchronous execution (see <a href="../../../org/apache/ignite/lang/IgniteAsyncSupport.html" title="interface in org.apache.ignite.lang"><code>IgniteAsyncSupport</code></a>).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>opId</code> - Operation ID that was returned from
<a href="../../../org/apache/ignite/IgniteEvents.html#remoteListen(org.apache.ignite.lang.IgniteBiPredicate, org.apache.ignite.lang.IgnitePredicate, int...)"><code>remoteListen(IgniteBiPredicate, IgnitePredicate, int...)</code></a> method.</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 failed to stop listeners.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/ignite/IgniteEvents.html#remoteListen(org.apache.ignite.lang.IgniteBiPredicate, org.apache.ignite.lang.IgnitePredicate, int...)"><code>remoteListen(IgniteBiPredicate, IgnitePredicate, int...)</code></a></dd></dl>
</li>
</ul>
<a name="waitForLocal(org.apache.ignite.lang.IgnitePredicate, int...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>waitForLocal</h4>
<pre><a href="../../../org/apache/ignite/lang/IgniteAsyncSupported.html" title="annotation in org.apache.ignite.lang">@IgniteAsyncSupported</a>
<span class='angle_bracket'>&lt;</span>T extends <a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a><span class='angle_bracket'>&gt;</span>&nbsp;T&nbsp;waitForLocal(@Nullable
<a href="../../../org/apache/ignite/lang/IgnitePredicate.html" title="interface in org.apache.ignite.lang">IgnitePredicate</a><span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;filter,
@Nullable
int...&nbsp;types)
throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre>
<div class="block">Waits for the specified events.
<p>
Supports asynchronous execution (see <a href="../../../org/apache/ignite/lang/IgniteAsyncSupport.html" title="interface in org.apache.ignite.lang"><code>IgniteAsyncSupport</code></a>).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>filter</code> - Optional filtering predicate. Only if predicates evaluates to <code>true</code> will the event
end the wait.</dd><dd><code>types</code> - Types of the events to wait for. If not provided, all events will be passed to the filter.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Grid event.</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 wait was interrupted.</dd></dl>
</li>
</ul>
<a name="localQuery(org.apache.ignite.lang.IgnitePredicate, int...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>localQuery</h4>
<pre><span class='angle_bracket'>&lt;</span>T extends <a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a><span class='angle_bracket'>&gt;</span>&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;localQuery(<a href="../../../org/apache/ignite/lang/IgnitePredicate.html" title="interface in org.apache.ignite.lang">IgnitePredicate</a><span class='angle_bracket'>&lt;</span>T<span class='angle_bracket'>&gt;</span>&nbsp;p,
@Nullable
int...&nbsp;types)</pre>
<div class="block">Queries local node for events using passed-in predicate filter for event selection.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - Predicate to filter events. All predicates must be satisfied for the
event to be returned.</dd><dd><code>types</code> - Event types to be queried.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Collection of grid events found on local node.</dd></dl>
</li>
</ul>
<a name="recordLocal(org.apache.ignite.events.Event)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>recordLocal</h4>
<pre>void&nbsp;recordLocal(<a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a>&nbsp;evt)</pre>
<div class="block">Records customer user generated event. All registered local listeners will be notified.
<p>
NOTE: all types in range <b>from 1 to 1000 are reserved</b> for
internal Ignite events and should not be used by user-defined events.
Attempt to record internal event with this method will cause <code>IllegalArgumentException</code>
to be thrown.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>evt</code> - Locally generated event.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - If event type is within Ignite reserved range between <code>1</code> and
<code>1000</code>.</dd></dl>
</li>
</ul>
<a name="localListen(org.apache.ignite.lang.IgnitePredicate, int...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>localListen</h4>
<pre>void&nbsp;localListen(<a href="../../../org/apache/ignite/lang/IgnitePredicate.html" title="interface in org.apache.ignite.lang">IgnitePredicate</a><span class='angle_bracket'>&lt;</span>? extends <a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a><span class='angle_bracket'>&gt;</span>&nbsp;lsnr,
int...&nbsp;types)</pre>
<div class="block">Adds an event listener for local events. Note that listener will be added regardless of whether
local node is in this projection or not.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lsnr</code> - Predicate that is called on each received event. If predicate returns <code>false</code>,
it will be unregistered and will stop receiving events.</dd><dd><code>types</code> - Event types for which this listener will be notified.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - Thrown in case when passed in array of event types is empty.</dd></dl>
</li>
</ul>
<a name="stopLocalListen(org.apache.ignite.lang.IgnitePredicate, int...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stopLocalListen</h4>
<pre>boolean&nbsp;stopLocalListen(<a href="../../../org/apache/ignite/lang/IgnitePredicate.html" title="interface in org.apache.ignite.lang">IgnitePredicate</a><span class='angle_bracket'>&lt;</span>? extends <a href="../../../org/apache/ignite/events/Event.html" title="interface in org.apache.ignite.events">Event</a><span class='angle_bracket'>&gt;</span>&nbsp;lsnr,
@Nullable
int...&nbsp;types)</pre>
<div class="block">Removes local event listener.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lsnr</code> - Local event listener to remove.</dd><dd><code>types</code> - Types of events for which to remove listener. If not specified,
then listener will be removed for all types it was registered for.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if listener was removed, <code>false</code> otherwise.</dd></dl>
</li>
</ul>
<a name="enableLocal(int...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>enableLocal</h4>
<pre>void&nbsp;enableLocal(int...&nbsp;types)</pre>
<div class="block">Enables provided events. Allows to start recording events that
were disabled before. Note that specified events will be enabled
regardless of whether local node is in this projection or not.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>types</code> - Events to enable.</dd></dl>
</li>
</ul>
<a name="disableLocal(int...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>disableLocal</h4>
<pre>void&nbsp;disableLocal(int...&nbsp;types)</pre>
<div class="block">Disables provided events. Allows to stop recording events that
were enabled before. Note that specified events will be disabled
regardless of whether local node is in this projection or not.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>types</code> - Events to disable.</dd></dl>
</li>
</ul>
<a name="enabledEvents()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>enabledEvents</h4>
<pre>int[]&nbsp;enabledEvents()</pre>
<div class="block">Gets types of enabled events.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Types of enabled events.</dd></dl>
</li>
</ul>
<a name="isEnabled(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEnabled</h4>
<pre>boolean&nbsp;isEnabled(int&nbsp;type)</pre>
<div class="block">Check if event is enabled.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - Event type.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>True</code> if event of passed in type is enabled.</dd></dl>
</li>
</ul>
<a name="withAsync()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>withAsync</h4>
<pre><a href="../../../org/apache/ignite/IgniteEvents.html" title="interface in org.apache.ignite">IgniteEvents</a>&nbsp;withAsync()</pre>
<div class="block">Gets component with asynchronous mode enabled.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../org/apache/ignite/lang/IgniteAsyncSupport.html#withAsync()">withAsync</a></code>&nbsp;in interface&nbsp;<code><a href="../../../org/apache/ignite/lang/IgniteAsyncSupport.html" title="interface in org.apache.ignite.lang">IgniteAsyncSupport</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>Component with asynchronous mode enabled.</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/IgniteEvents.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>Apache Ignite - In-Memory Data Fabric</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/ignite/IgniteDeploymentException.html" title="class in org.apache.ignite"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/ignite/IgniteEvents.html" target="_top">Frames</a></li>
<li><a href="IgniteEvents.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://incubator.apache.org/projects/ignite.html"><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>Apache Ignite Fabric</b> </td> <td>:&nbsp;&nbsp; ver. <strong>1.0.0-RC3</strong> </td> </tr> <tr style="padding: 0; margin: 0"> <td> <b>Release Date</b> </td> <td>:&nbsp;&nbsp; March 24 2015 </td> </tr> </tbody> </table> </td> </tr> </table></small></p>
<!--FOOTER--><script type='text/javascript'>SyntaxHighlighter.all();dp.SyntaxHighlighter.HighlightAll('code');</script>
</body>
</html>