| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (version 1.6.0_36) on Sat Nov 28 01:44:49 CST 2015 --> |
| <title>Subscription</title> |
| <meta name="date" content="2015-11-28"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Subscription"; |
| } |
| //--> |
| </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="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="../../../../io/gearpump/streaming/task/Subscriber$.html" title="class in io.gearpump.streaming.task"><span class="strong">PREV CLASS</span></a></li> |
| <li><a href="../../../../io/gearpump/streaming/task/Subscription$.html" title="class in io.gearpump.streaming.task"><span class="strong">NEXT CLASS</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?io/gearpump/streaming/task/Subscription.html" target="_top">FRAMES</a></li> |
| <li><a href="Subscription.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><a href="#constructor_summary">CONSTR</a> | </li> |
| <li><a href="#method_summary">METHOD</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>DETAIL: </li> |
| <li>FIELD | </li> |
| <li><a href="#constructor_detail">CONSTR</a> | </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"> |
| <p class="subTitle">io.gearpump.streaming.task</p> |
| <h2 title="Class Subscription" class="title">Class Subscription</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>io.gearpump.streaming.task.Subscription</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <strong>Subscription</strong> |
| extends java.lang.Object</pre> |
| <div class="block">This manage the output and message clock for single downstream processor |
| <p> |
| param: subscriber downstream processor |
| param: maxPendingMessageCount trigger flow control. Should be bigger than maxPendingMessageCountPerAckRequest |
| param: ackOnceEveryMessageCount send on AckRequest to the target</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../../io/gearpump/streaming/task/Subscription.html#Subscription(int, int, io.gearpump.streaming.task.TaskId, io.gearpump.streaming.task.Subscriber, int, io.gearpump.streaming.task.ExpressTransport, int, int)">Subscription</a></strong>(int appId, |
| int executorId, |
| <a href="../../../../io/gearpump/streaming/task/TaskId.html" title="class in io.gearpump.streaming.task">TaskId</a> taskId, |
| <a href="../../../../io/gearpump/streaming/task/Subscriber.html" title="class in io.gearpump.streaming.task">Subscriber</a> subscriber, |
| int sessionId, |
| <a href="../../../../io/gearpump/streaming/task/ExpressTransport.html" title="interface in io.gearpump.streaming.task">ExpressTransport</a> transport, |
| int maxPendingMessageCount, |
| int ackOnceEveryMessageCount)</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== 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"> </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>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../io/gearpump/streaming/task/Subscription.html#allowSendingMoreMessages()">allowSendingMoreMessages</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../io/gearpump/streaming/task/Subscription.html#changeLife(io.gearpump.streaming.LifeTime)">changeLife</a></strong>(<a href="../../../../io/gearpump/streaming/LifeTime.html" title="class in io.gearpump.streaming">LifeTime</a> life)</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>org.slf4j.Logger</code></td> |
| <td class="colLast"><code><strong><a href="../../../../io/gearpump/streaming/task/Subscription.html#LOG()">LOG</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../io/gearpump/streaming/task/Subscription.html#MAX_PENDING_MESSAGE_COUNT()">MAX_PENDING_MESSAGE_COUNT</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../io/gearpump/streaming/task/Subscription.html#minClock()">minClock</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../io/gearpump/streaming/task/Subscription.html#ONE_ACKREQUEST_EVERY_MESSAGE_COUNT()">ONE_ACKREQUEST_EVERY_MESSAGE_COUNT</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>io.gearpump.partitioner.Partitioner</code></td> |
| <td class="colLast"><code><strong><a href="../../../../io/gearpump/streaming/task/Subscription.html#partitioner()">partitioner</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../io/gearpump/streaming/task/Subscription.html#receiveAck(io.gearpump.streaming.task.Ack)">receiveAck</a></strong>(<a href="../../../../io/gearpump/streaming/task/Ack.html" title="class in io.gearpump.streaming.task">Ack</a> ack)</code> |
| <div class="block">Handle acknowledge message.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>scala.Function1<io.gearpump.Message,java.lang.Object></code></td> |
| <td class="colLast"><code><strong><a href="../../../../io/gearpump/streaming/task/Subscription.html#sendFn()">sendFn</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../io/gearpump/streaming/task/Subscription.html#sendMessage(io.gearpump.Message)">sendMessage</a></strong>(io.gearpump.Message msg)</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../io/gearpump/streaming/task/Subscription.html#sendMessage(io.gearpump.Message, int)">sendMessage</a></strong>(io.gearpump.Message msg, |
| int partition)</code> |
| <div class="block">Return how many message is actually sent by this subscription</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../io/gearpump/streaming/task/Subscription.html#start()">start</a></strong>()</code> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="Subscription(int, int, io.gearpump.streaming.task.TaskId, io.gearpump.streaming.task.Subscriber, int, io.gearpump.streaming.task.ExpressTransport, int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>Subscription</h4> |
| <pre>public Subscription(int appId, |
| int executorId, |
| <a href="../../../../io/gearpump/streaming/task/TaskId.html" title="class in io.gearpump.streaming.task">TaskId</a> taskId, |
| <a href="../../../../io/gearpump/streaming/task/Subscriber.html" title="class in io.gearpump.streaming.task">Subscriber</a> subscriber, |
| int sessionId, |
| <a href="../../../../io/gearpump/streaming/task/ExpressTransport.html" title="interface in io.gearpump.streaming.task">ExpressTransport</a> transport, |
| int maxPendingMessageCount, |
| int ackOnceEveryMessageCount)</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="ONE_ACKREQUEST_EVERY_MESSAGE_COUNT()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ONE_ACKREQUEST_EVERY_MESSAGE_COUNT</h4> |
| <pre>public static final int ONE_ACKREQUEST_EVERY_MESSAGE_COUNT()</pre> |
| </li> |
| </ul> |
| <a name="MAX_PENDING_MESSAGE_COUNT()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>MAX_PENDING_MESSAGE_COUNT</h4> |
| <pre>public static final int MAX_PENDING_MESSAGE_COUNT()</pre> |
| </li> |
| </ul> |
| <a name="LOG()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>LOG</h4> |
| <pre>public org.slf4j.Logger LOG()</pre> |
| </li> |
| </ul> |
| <a name="partitioner()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>partitioner</h4> |
| <pre>public io.gearpump.partitioner.Partitioner partitioner()</pre> |
| </li> |
| </ul> |
| <a name="sendFn()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendFn</h4> |
| <pre>public scala.Function1<io.gearpump.Message,java.lang.Object> sendFn()</pre> |
| </li> |
| </ul> |
| <a name="changeLife(io.gearpump.streaming.LifeTime)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>changeLife</h4> |
| <pre>public void changeLife(<a href="../../../../io/gearpump/streaming/LifeTime.html" title="class in io.gearpump.streaming">LifeTime</a> life)</pre> |
| </li> |
| </ul> |
| <a name="start()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>start</h4> |
| <pre>public void start()</pre> |
| </li> |
| </ul> |
| <a name="sendMessage(io.gearpump.Message)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendMessage</h4> |
| <pre>public int sendMessage(io.gearpump.Message msg)</pre> |
| </li> |
| </ul> |
| <a name="sendMessage(io.gearpump.Message, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sendMessage</h4> |
| <pre>public int sendMessage(io.gearpump.Message msg, |
| int partition)</pre> |
| <div class="block">Return how many message is actually sent by this subscription</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>msg</code> - the message to send</dd><dd><code>partition</code> - the target partition to send message to</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>1 if success</dd></dl> |
| </li> |
| </ul> |
| <a name="receiveAck(io.gearpump.streaming.task.Ack)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>receiveAck</h4> |
| <pre>public void receiveAck(<a href="../../../../io/gearpump/streaming/task/Ack.html" title="class in io.gearpump.streaming.task">Ack</a> ack)</pre> |
| <div class="block">Handle acknowledge message. |
| Throw MessageLossException if required.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>ack</code> - acknowledge message received</dd></dl> |
| </li> |
| </ul> |
| <a name="minClock()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>minClock</h4> |
| <pre>public long minClock()</pre> |
| </li> |
| </ul> |
| <a name="allowSendingMoreMessages()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>allowSendingMoreMessages</h4> |
| <pre>public boolean allowSendingMoreMessages()</pre> |
| </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="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="../../../../io/gearpump/streaming/task/Subscriber$.html" title="class in io.gearpump.streaming.task"><span class="strong">PREV CLASS</span></a></li> |
| <li><a href="../../../../io/gearpump/streaming/task/Subscription$.html" title="class in io.gearpump.streaming.task"><span class="strong">NEXT CLASS</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?io/gearpump/streaming/task/Subscription.html" target="_top">FRAMES</a></li> |
| <li><a href="Subscription.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><a href="#constructor_summary">CONSTR</a> | </li> |
| <li><a href="#method_summary">METHOD</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>DETAIL: </li> |
| <li>FIELD | </li> |
| <li><a href="#constructor_detail">CONSTR</a> | </li> |
| <li><a href="#method_detail">METHOD</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |