| <!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.6.0/javadoc/org/apache/ignite/IgniteMessaging.html" /> |
| <META NAME="ROBOTS" CONTENT="NOINDEX"> |
| |
| <!-- Generated by javadoc (1.8.0_77) on Tue Jul 10 11:04:39 UTC 2018 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>IgniteMessaging (Ignite 2.6.0)</title> |
| <meta name="date" content="2018-07-10"> |
| <link rel="stylesheet" type="text/css" href="../../../javadoc.css" title="Style"> |
| <script type="text/javascript" src="../../../script.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"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="IgniteMessaging (Ignite 2.6.0)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":38}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],32:["t6","Deprecated 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/IgniteMessaging.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">Ignite - In-Memory Data Fabric</div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../org/apache/ignite/IgniteLogger.html" title="interface in org.apache.ignite"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../org/apache/ignite/IgniteQueue.html" title="interface in org.apache.ignite"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?org/apache/ignite/IgniteMessaging.html" target="_top">Frames</a></li> |
| <li><a href="IgniteMessaging.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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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 IgniteMessaging" class="title">Interface IgniteMessaging</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="typeNameLabel">IgniteMessaging</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 topic-based message exchange among nodes defined by <a href="../../../org/apache/ignite/IgniteMessaging.html#clusterGroup--"><code>clusterGroup()</code></a>. |
| Users can send ordered and unordered messages to various topics. Note that same topic name |
| cannot be reused between ordered and unordered messages. |
| <p> |
| Instance of <code>IgniteMessaging</code> is obtained from <a href="../../../org/apache/ignite/Ignite.html" title="interface in org.apache.ignite"><code>Ignite</code></a> as follows: |
| <pre class="brush:java"> |
| Ignite ignite = Ignition.ignite(); |
| |
| // Messaging instance spanning all cluster nodes. |
| IgniteMessaging m = ignite.message(); |
| </pre> |
| You can also obtain an instance of messaging facade over a specific cluster group: |
| <pre class="brush:java"> |
| // Cluster group over remote nodes (excluding the local node). |
| ClusterGroup remoteNodes = ignite.cluster().forRemotes(); |
| |
| // Messaging instance spanning all remote cluster nodes. |
| IgniteMessaging m = ignite.message(remoteNodes); |
| </pre> |
| <p> |
| There are <code>2</code> ways to subscribe to message listening, <code>local</code> and <code>remote</code>. |
| <p> |
| Local subscription, defined by <a href="../../../org/apache/ignite/IgniteMessaging.html#localListen-java.lang.Object-org.apache.ignite.lang.IgniteBiPredicate-"><code>localListen(Object, IgniteBiPredicate)</code></a> method, will add |
| a listener for a given topic on local node only. This listener will be notified whenever any |
| node within the underlying cluster group will send a message for a given topic to this node. Local listen |
| subscription will happen regardless of whether the local node belongs to this cluster group or not. |
| <p> |
| Remote subscription, defined by <a href="../../../org/apache/ignite/IgniteMessaging.html#remoteListen-java.lang.Object-org.apache.ignite.lang.IgniteBiPredicate-"><code>remoteListen(Object, IgniteBiPredicate)</code></a>, will add a |
| message listener for a given topic to all nodes in the underlying cluster group (possibly including this node if |
| it belongs to the cluster group as well). This means that any node within this cluster group can send |
| a message for a given topic and all nodes within the cluster group will receive listener notifications. |
| <h1 class="header">Ordered vs Unordered</h1> |
| Ignite allows for sending ordered messages (see <a href="../../../org/apache/ignite/IgniteMessaging.html#sendOrdered-java.lang.Object-java.lang.Object-long-"><code>sendOrdered(Object, Object, long)</code></a>), i.e. |
| messages will be received in the same order they were sent. Ordered messages have a <code>timeout</code> |
| parameter associated with them which specifies how long an out-of-order message will stay in a queue, |
| waiting for messages that are ordered ahead of it to arrive. If timeout expires, then all ordered |
| messages for a given topic that have not arrived yet will be skipped. When (and if) expired messages |
| actually do arrive, they will be ignored.</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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </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><a href="../../../org/apache/ignite/cluster/ClusterGroup.html" title="interface in org.apache.ignite.cluster">ClusterGroup</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteMessaging.html#clusterGroup--">clusterGroup</a></span>()</code> |
| <div class="block">Gets the cluster group to which this <code>GridMessaging</code> instance belongs.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteMessaging.html#localListen-java.lang.Object-org.apache.ignite.lang.IgniteBiPredicate-">localListen</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> topic, |
| <a href="../../../org/apache/ignite/lang/IgniteBiPredicate.html" title="interface in org.apache.ignite.lang">IgniteBiPredicate</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>,?> p)</code> |
| <div class="block">Adds local listener for given topic on local node only.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteMessaging.html#remoteListen-java.lang.Object-org.apache.ignite.lang.IgniteBiPredicate-">remoteListen</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> topic, |
| <a href="../../../org/apache/ignite/lang/IgniteBiPredicate.html" title="interface in org.apache.ignite.lang">IgniteBiPredicate</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>,?> p)</code> |
| <div class="block">Adds a message listener for a given topic to all nodes in the cluster group (possibly including |
| this node if it belongs to the cluster group as well).</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteMessaging.html#remoteListenAsync-java.lang.Object-org.apache.ignite.lang.IgniteBiPredicate-">remoteListenAsync</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> topic, |
| <a href="../../../org/apache/ignite/lang/IgniteBiPredicate.html" title="interface in org.apache.ignite.lang">IgniteBiPredicate</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>,?> p)</code> |
| <div class="block">Asynchronously adds a message listener for a given topic to all nodes in the cluster group (possibly including |
| this node if it belongs to the cluster group as well).</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteMessaging.html#send-java.lang.Object-java.util.Collection-">send</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> topic, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><?> msgs)</code> |
| <div class="block">Sends given messages with the specified topic to the nodes in the underlying cluster group.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteMessaging.html#send-java.lang.Object-java.lang.Object-">send</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> topic, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> msg)</code> |
| <div class="block">Sends given message with specified topic to the nodes in the underlying cluster group.</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/IgniteMessaging.html#sendOrdered-java.lang.Object-java.lang.Object-long-">sendOrdered</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> topic, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> msg, |
| long timeout)</code> |
| <div class="block">Sends given message with specified topic to the nodes in the underlying cluster group.</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/IgniteMessaging.html#stopLocalListen-java.lang.Object-org.apache.ignite.lang.IgniteBiPredicate-">stopLocalListen</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> topic, |
| <a href="../../../org/apache/ignite/lang/IgniteBiPredicate.html" title="interface in org.apache.ignite.lang">IgniteBiPredicate</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>,?> p)</code> |
| <div class="block">Unregisters local listener for given topic on local node only.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteMessaging.html#stopRemoteListen-java.util.UUID-">stopRemoteListen</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a> opId)</code> |
| <div class="block">Unregisters all listeners identified with provided operation ID on all nodes in the cluster group.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteMessaging.html#stopRemoteListenAsync-java.util.UUID-">stopRemoteListenAsync</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a> opId)</code> |
| <div class="block">Asynchronously unregisters all listeners identified with provided operation ID on all nodes in the cluster group.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/ignite/IgniteMessaging.html" title="interface in org.apache.ignite">IgniteMessaging</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/ignite/IgniteMessaging.html#withAsync--">withAsync</a></span>()</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> </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 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> clusterGroup()</pre> |
| <div class="block">Gets the cluster group to which this <code>GridMessaging</code> instance belongs.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Cluster group to which this <code>GridMessaging</code> instance belongs.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="send-java.lang.Object-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>send</h4> |
| <pre>void send(@Nullable |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> topic, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> msg) |
| throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Sends given message with specified topic to the nodes in the underlying cluster group. |
| <p> |
| By default all local listeners will be executed in the calling thread, or if you use |
| <a href="../../../org/apache/ignite/IgniteMessaging.html#withAsync--"><code>withAsync()</code></a>, listeners will execute in public thread pool (in this case it is user's |
| responsibility to implement back-pressure and limit number of concurrently executed async messages).</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>topic</code> - Topic to send to, <code>null</code> for default topic.</dd> |
| <dd><code>msg</code> - Message to send.</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 failed to send a message to any of the nodes.</dd> |
| <dd><code><a href="../../../org/apache/ignite/cluster/ClusterGroupEmptyException.html" title="class in org.apache.ignite.cluster">ClusterGroupEmptyException</a></code> - Thrown in case when cluster group is empty.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="send-java.lang.Object-java.util.Collection-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>send</h4> |
| <pre>void send(@Nullable |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> topic, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><?> msgs) |
| throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Sends given messages with the specified topic to the nodes in the underlying cluster group. |
| <p> |
| By default all local listeners will be executed in the calling thread, or if you use |
| <a href="../../../org/apache/ignite/IgniteMessaging.html#withAsync--"><code>withAsync()</code></a>, listeners will execute in public thread pool (in this case it is user's |
| responsibility to implement back-pressure and limit number of concurrently executed async messages).</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>topic</code> - Topic to send to, <code>null</code> for default topic.</dd> |
| <dd><code>msgs</code> - Messages to send. Order of the sending is undefined. If the method produces |
| the exception none or some messages could have been sent already.</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 failed to send a message to any of the nodes.</dd> |
| <dd><code><a href="../../../org/apache/ignite/cluster/ClusterGroupEmptyException.html" title="class in org.apache.ignite.cluster">ClusterGroupEmptyException</a></code> - Thrown in case when cluster group is empty.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="sendOrdered-java.lang.Object-java.lang.Object-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendOrdered</h4> |
| <pre>void sendOrdered(@Nullable |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> topic, |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> msg, |
| long timeout) |
| throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Sends given message with specified topic to the nodes in the underlying cluster group. Messages sent with |
| this method will arrive in the same order they were sent. Note that if a topic is used |
| for ordered messages, then it cannot be reused for non-ordered messages. Note that local listeners |
| are always executed in public thread pool, no matter default or <a href="../../../org/apache/ignite/IgniteMessaging.html#withAsync--"><code>withAsync()</code></a> mode is used. |
| <p> |
| The <code>timeout</code> parameter specifies how long an out-of-order message will stay in a queue, |
| waiting for messages that are ordered ahead of it to arrive. If timeout expires, then all ordered |
| messages that have not arrived before this message will be skipped. When (and if) expired messages |
| actually do arrive, they will be ignored.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>topic</code> - Topic to send to, <code>null</code> for default topic.</dd> |
| <dd><code>msg</code> - Message to send.</dd> |
| <dd><code>timeout</code> - Message timeout in milliseconds, <code>0</code> for default |
| which is <a href="../../../org/apache/ignite/configuration/IgniteConfiguration.html#getNetworkTimeout--"><code>IgniteConfiguration.getNetworkTimeout()</code></a>.</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 failed to send a message to any of the nodes.</dd> |
| <dd><code><a href="../../../org/apache/ignite/cluster/ClusterGroupEmptyException.html" title="class in org.apache.ignite.cluster">ClusterGroupEmptyException</a></code> - Thrown in case when cluster group is empty.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="localListen-java.lang.Object-org.apache.ignite.lang.IgniteBiPredicate-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>localListen</h4> |
| <pre>void localListen(@Nullable |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> topic, |
| <a href="../../../org/apache/ignite/lang/IgniteBiPredicate.html" title="interface in org.apache.ignite.lang">IgniteBiPredicate</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>,?> p)</pre> |
| <div class="block">Adds local listener for given topic on local node only. This listener will be notified whenever any |
| node within the cluster group will send a message for a given topic to this node. Local listen |
| subscription will happen regardless of whether local node belongs to this cluster group or not.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>topic</code> - Topic to subscribe to.</dd> |
| <dd><code>p</code> - Predicate that is called on each received message. If predicate returns <code>false</code>, |
| then it will be unsubscribed from any further notifications.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="stopLocalListen-java.lang.Object-org.apache.ignite.lang.IgniteBiPredicate-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>stopLocalListen</h4> |
| <pre>void stopLocalListen(@Nullable |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> topic, |
| <a href="../../../org/apache/ignite/lang/IgniteBiPredicate.html" title="interface in org.apache.ignite.lang">IgniteBiPredicate</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>,?> p)</pre> |
| <div class="block">Unregisters local listener for given topic on local node only.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>topic</code> - Topic to unsubscribe from.</dd> |
| <dd><code>p</code> - Listener predicate.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="remoteListen-java.lang.Object-org.apache.ignite.lang.IgniteBiPredicate-"> |
| <!-- --> |
| </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> |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a> remoteListen(@Nullable |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> topic, |
| <a href="../../../org/apache/ignite/lang/IgniteBiPredicate.html" title="interface in org.apache.ignite.lang">IgniteBiPredicate</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>,?> p) |
| throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Adds a message listener for a given topic to all nodes in the cluster group (possibly including |
| this node if it belongs to the cluster group as well). This means that any node within this cluster |
| group can send a message for a given topic and all nodes within the cluster group will receive |
| listener notifications.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>topic</code> - Topic to subscribe to, <code>null</code> means default topic.</dd> |
| <dd><code>p</code> - Predicate that is called on each node for each received message. If predicate returns <code>false</code>, |
| then it will be unsubscribed from any further notifications.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>Operation ID</code> that can be passed to <a href="../../../org/apache/ignite/IgniteMessaging.html#stopRemoteListen-java.util.UUID-"><code>stopRemoteListen(UUID)</code></a> method to stop listening.</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 failed to add listener.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="remoteListenAsync-java.lang.Object-org.apache.ignite.lang.IgniteBiPredicate-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>remoteListenAsync</h4> |
| <pre><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>> remoteListenAsync(@Nullable |
| <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> topic, |
| <a href="../../../org/apache/ignite/lang/IgniteBiPredicate.html" title="interface in org.apache.ignite.lang">IgniteBiPredicate</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a>,?> p) |
| throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Asynchronously adds a message listener for a given topic to all nodes in the cluster group (possibly including |
| this node if it belongs to the cluster group as well). This means that any node within this cluster |
| group can send a message for a given topic and all nodes within the cluster group will receive |
| listener notifications.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>topic</code> - Topic to subscribe to, <code>null</code> means default topic.</dd> |
| <dd><code>p</code> - Predicate that is called on each node for each received message. If predicate returns <code>false</code>, |
| then it will be unsubscribed from any further notifications.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a Future representing pending completion of the operation. The completed future contains |
| <code>Operation ID</code> that can be passed to <a href="../../../org/apache/ignite/IgniteMessaging.html#stopRemoteListen-java.util.UUID-"><code>stopRemoteListen(UUID)</code></a> method to stop listening.</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 failed to add listener.</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 stopRemoteListen(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a> opId) |
| throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Unregisters all listeners identified with provided operation ID on all nodes in the cluster group. |
| <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="paramLabel">Parameters:</span></dt> |
| <dd><code>opId</code> - Listen ID that was returned from <a href="../../../org/apache/ignite/IgniteMessaging.html#remoteListen-java.lang.Object-org.apache.ignite.lang.IgniteBiPredicate-"><code>remoteListen(Object, IgniteBiPredicate)</code></a> method.</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 failed to unregister listeners.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="stopRemoteListenAsync-java.util.UUID-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>stopRemoteListenAsync</h4> |
| <pre><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</a>> stopRemoteListenAsync(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util">UUID</a> opId) |
| throws <a href="../../../org/apache/ignite/IgniteException.html" title="class in org.apache.ignite">IgniteException</a></pre> |
| <div class="block">Asynchronously unregisters all listeners identified with provided operation ID on all nodes in the cluster group.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>opId</code> - Listen ID that was returned from <a href="../../../org/apache/ignite/IgniteMessaging.html#remoteListen-java.lang.Object-org.apache.ignite.lang.IgniteBiPredicate-"><code>remoteListen(Object, IgniteBiPredicate)</code></a> method.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a Future representing pending completion of the operation.</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 failed to unregister listeners.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="withAsync--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>withAsync</h4> |
| <pre><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> |
| <a href="../../../org/apache/ignite/IgniteMessaging.html" title="interface in org.apache.ignite">IgniteMessaging</a> withAsync()</pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> </div> |
| <div class="block">Gets instance of this component with asynchronous mode enabled.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../org/apache/ignite/lang/IgniteAsyncSupport.html#withAsync--">withAsync</a></code> in interface <code><a href="../../../org/apache/ignite/lang/IgniteAsyncSupport.html" title="interface in org.apache.ignite.lang">IgniteAsyncSupport</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Instance of this 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> |
| <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/IgniteMessaging.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">Ignite - In-Memory Data Fabric</div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../org/apache/ignite/IgniteLogger.html" title="interface in org.apache.ignite"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../org/apache/ignite/IgniteQueue.html" title="interface in org.apache.ignite"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?org/apache/ignite/IgniteMessaging.html" target="_top">Frames</a></li> |
| <li><a href="IgniteMessaging.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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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>2018 Copyright © 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 Fabric</b> </td> <td>: ver. <strong>2.6.0</strong> </td> </tr> <tr style="padding: 0; margin: 0"> <td> <b>Release Date</b> </td> <td>: July 10 2018 </td> </tr> </tbody> </table> </td> </tr> </table></small></p> |
| </body> |
| </html> |