verspaetung/groovydoc/com/github/lookout/verspaetung/KafkaPoller.html

427 lines
22 KiB
HTML

<!--
Copyright 2003-2015 the original author or authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- **************************************************************** -->
<!-- * PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
<!-- * i.e. only iterate & print data where possible. Thanks, Jez. * -->
<!-- **************************************************************** -->
<html>
<head>
<!-- Generated by groovydoc (2.4.3) on Sat Jul 04 14:46:13 PDT 2015 -->
<title>KafkaPoller (verspaetung 0.3.0 API)</title>
<meta name="date" content="2015-07-04">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="KafkaPoller (verspaetung 0.3.0 API)";
}
//-->
</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="../../../../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">
<div>
<ul class="navList">
<li><a href="../../../../index.html?com/github/lookout/verspaetung/KafkaPoller" target="_top">Frames</a></li>
<li><a href="KafkaPoller.html" target="_top">No Frames</a></li>
</ul>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
Nested&nbsp;&nbsp;&nbsp;Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_summary">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_summary">Method</a></li>&nbsp;&nbsp;&nbsp;
</ul>
<ul class="subNavList">
<li>&nbsp;|&nbsp;Detail:&nbsp;</li>
Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_detail">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_detail">Method</a></li>&nbsp;&nbsp;&nbsp;
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">Package: <strong>com.github.lookout.verspaetung</strong></div>
<h2 title="[Groovy] Class KafkaPoller" class="title">[Groovy] Class KafkaPoller</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><ul class="inheritance"></ul></li><li><ul class="inheritance"></ul></li><li>com.github.lookout.verspaetung.KafkaPoller
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== NESTED CLASS SUMMARY =========== -->
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary"><!-- --></a>
<ul class="blockList">
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited fields summary table">
<caption><span>Inherited fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Fields inherited from class</th>
<th class="colLast" scope="col">Fields</th>
</tr>
<tr class="altColor">
<td class="colFirst"><strong><code>class java.lang.Thread</code></strong></td>
<td class="colLast"><code>MIN_PRIORITY, NORM_PRIORITY, MAX_PRIORITY</code></td>
</tr>
</table>
</ul>
</li>
</ul>
<!-- =========== PROPERTY SUMMARY =========== -->
<!-- =========== ELEMENT SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary"><!-- --></a>
<h3>Constructor Summary</h3>
<ul class="blockList">
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructors Summary table">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor and description</th>
</tr>
<tr class="altColor">
<td class="colFirst">
<code><a href="#KafkaPoller(java.util.AbstractMap, java.util.AbstractSet)">KafkaPoller</a></strong>
(java.util.AbstractMap map, java.util.AbstractSet topicSet)</code><br></td>
</tr>
</table>
</ul>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary"><!-- --></a>
<h3>Methods Summary</h3>
<ul class="blockList">
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Methods Summary table">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Type</th>
<th class="colLast" scope="col">Name and description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</strong></code></td>
<td class="colLast"><code><strong><a href="#captureLatestOffsetFor(com.github.lookout.verspaetung.TopicPartition, java.lang.Object)">captureLatestOffsetFor</a></strong>(<a href='../../../../com/github/lookout/verspaetung/TopicPartition.html'>TopicPartition</a> tp, java.lang.Object partitionMetadata)</code><br>Fetch the leader metadata and update our data structures</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</strong></code></td>
<td class="colLast"><code><strong><a href="#die()">die</a></strong>()</code><br>Signal the runloop to safely die after it's next iteration</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</strong></code></td>
<td class="colLast"><code><strong><a href="#dumpMetadata()">dumpMetadata</a></strong>()</code><br></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Long</strong></code></td>
<td class="colLast"><code><strong><a href="#latestFromLeader(java.lang.Integer, java.lang.String, java.lang.Integer)">latestFromLeader</a></strong>(java.lang.Integer leaderId, java.lang.String topic, java.lang.Integer partition)</code><br></td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</strong></code></td>
<td class="colLast"><code><strong><a href="#reconnect()">reconnect</a></strong>()</code><br>Blocking reconnect to the Kafka brokers</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</strong></code></td>
<td class="colLast"><code><strong><a href="#refresh(List<KafkaBroker>)">refresh</a></strong>(java.util.List&lt;<a href='../../../../com/github/lookout/verspaetung/KafkaBroker.html' title='KafkaBroker'>KafkaBroker</a>&gt; brokers)</code><br>Store a new list of KafkaBroker objects and signal a reconnection</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</strong></code></td>
<td class="colLast"><code><strong><a href="#run()">run</a></strong>()</code><br></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Iterable</strong></code></td>
<td class="colLast"><code><strong><a href="#withScalaCollection(scala.collection.Iterable)">withScalaCollection</a></strong>(scala.collection.Iterable iter)</code><br></td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</strong></code></td>
<td class="colLast"><code><strong><a href="#withTopicsAndPartitions(java.lang.Object, groovy.lang.Closure)">withTopicsAndPartitions</a></strong>(java.lang.Object metadata, groovy.lang.Closure closure)</code><br>Invoke the given closure with the TopicPartition and Partition meta-data
informationn for all of the topic meta-data that was passed in.</td>
</tr>
</table>
</ul>
</li>
<li class="blockList"><a name="method_summary"><!-- --></a>
<h3>Inherited Methods Summary</h3>
<ul class="blockList">
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
<caption><span>Inherited Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Methods inherited from class</th>
<th class="colLast" scope="col">Name</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>class java.lang.Thread</strong></code></td>
<td class="colLast"><code>java.lang.Thread#run(), java.lang.Thread#toString(), java.lang.Thread#isInterrupted(), java.lang.Thread#currentThread(), java.lang.Thread#getName(), java.lang.Thread#start(), java.lang.Thread#getThreadGroup(), java.lang.Thread#getStackTrace(), java.lang.Thread#holdsLock(java.lang.Object), java.lang.Thread#dumpStack(), java.lang.Thread#setPriority(int), java.lang.Thread#setDaemon(boolean), java.lang.Thread#yield(), java.lang.Thread#sleep(long, int), java.lang.Thread#sleep(long), java.lang.Thread#stop(java.lang.Throwable), java.lang.Thread#stop(), java.lang.Thread#interrupt(), java.lang.Thread#interrupted(), java.lang.Thread#destroy(), java.lang.Thread#isAlive(), java.lang.Thread#suspend(), java.lang.Thread#resume(), java.lang.Thread#getPriority(), java.lang.Thread#setName(java.lang.String), java.lang.Thread#activeCount(), java.lang.Thread#enumerate([Ljava.lang.Thread;), java.lang.Thread#countStackFrames(), java.lang.Thread#join(), java.lang.Thread#join(long), java.lang.Thread#join(long, int), java.lang.Thread#isDaemon(), java.lang.Thread#checkAccess(), java.lang.Thread#getContextClassLoader(), java.lang.Thread#setContextClassLoader(java.lang.ClassLoader), java.lang.Thread#getAllStackTraces(), java.lang.Thread#getId(), java.lang.Thread#getState(), java.lang.Thread#setDefaultUncaughtExceptionHandler(java.lang.Thread$UncaughtExceptionHandler), java.lang.Thread#getDefaultUncaughtExceptionHandler(), java.lang.Thread#getUncaughtExceptionHandler(), java.lang.Thread#setUncaughtExceptionHandler(java.lang.Thread$UncaughtExceptionHandler), java.lang.Thread#wait(long, int), java.lang.Thread#wait(long), java.lang.Thread#wait(), java.lang.Thread#equals(java.lang.Object), java.lang.Thread#hashCode(), java.lang.Thread#getClass(), java.lang.Thread#notify(), java.lang.Thread#notifyAll()</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>class java.lang.Object</strong></code></td>
<td class="colLast"><code>java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()</code></td>
</tr>
</table>
</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="KafkaPoller(java.util.AbstractMap, java.util.AbstractSet)"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
<h4><strong>KafkaPoller</strong>(java.util.AbstractMap map, java.util.AbstractSet topicSet)</h4>
<p></p>
</li>
</ul>
</li>
</ul>
<!-- =========== METHOD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="captureLatestOffsetFor(com.github.lookout.verspaetung.TopicPartition, java.lang.Object)"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
<h4>void <strong>captureLatestOffsetFor</strong>(<a href='../../../../com/github/lookout/verspaetung/TopicPartition.html'>TopicPartition</a> tp, java.lang.Object partitionMetadata)</h4>
<p> Fetch the leader metadata and update our data structures
</p>
</li>
</ul>
<a name="die()"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
<h4>void <strong>die</strong>()</h4>
<p> Signal the runloop to safely die after it's next iteration
</p>
</li>
</ul>
<a name="dumpMetadata()"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
<h4>void <strong>dumpMetadata</strong>()</h4>
<p></p>
</li>
</ul>
<a name="latestFromLeader(java.lang.Integer, java.lang.String, java.lang.Integer)"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
<h4>java.lang.Long <strong>latestFromLeader</strong>(java.lang.Integer leaderId, java.lang.String topic, java.lang.Integer partition)</h4>
<p></p>
</li>
</ul>
<a name="reconnect()"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
<h4>void <strong>reconnect</strong>()</h4>
<p> Blocking reconnect to the Kafka brokers
</p>
</li>
</ul>
<a name="refresh(List<KafkaBroker>)"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
<h4>void <strong>refresh</strong>(java.util.List&lt;<a href='../../../../com/github/lookout/verspaetung/KafkaBroker.html' title='KafkaBroker'>KafkaBroker</a>&gt; brokers)</h4>
<p> Store a new list of KafkaBroker objects and signal a reconnection
</p>
</li>
</ul>
<a name="run()"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
<h4>void <strong>run</strong>()</h4>
<p></p>
</li>
</ul>
<a name="withScalaCollection(scala.collection.Iterable)"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
<h4>java.lang.Iterable <strong>withScalaCollection</strong>(scala.collection.Iterable iter)</h4>
<p></p>
</li>
</ul>
<a name="withTopicsAndPartitions(java.lang.Object, groovy.lang.Closure)"><!-- --></a>
<ul class="blockListLast">
<li class="blockList">
<h4>void <strong>withTopicsAndPartitions</strong>(java.lang.Object metadata, groovy.lang.Closure closure)</h4>
<p> Invoke the given closure with the TopicPartition and Partition meta-data
informationn for all of the topic meta-data that was passed in.
The 'metadata' is the expected return from
kafka.client.ClientUtils.fetchTopicMetadata
</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</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="../../../../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">
<div>
<ul class="navList">
<li><a href="../../../../index.html?com/github/lookout/verspaetung/KafkaPoller" target="_top">Frames</a></li>
<li><a href="KafkaPoller.html" target="_top">No Frames</a></li>
</ul>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
Nested&nbsp;&nbsp;&nbsp;Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_summary">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_summary">Method</a></li>&nbsp;&nbsp;&nbsp;
</ul>
<ul class="subNavList">
<li>&nbsp;|&nbsp;Detail:&nbsp;</li>
Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_detail">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_detail">Method</a></li>&nbsp;&nbsp;&nbsp;
</ul>
</div>
<p>Groovy Documentation</p>
<a name="skip-navbar_bottom">
<!-- -->
</a>
</div>
</div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>