blob: 9a88e4ae25fb8b2064680d6ed7ac086f0749539c [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>
<!-- Generated by javadoc (version 1.7.0_80) on Fri Nov 10 23:49:16 GMT 2017 -->
<title>TopicPartitionInfo (kafka 0.11.0.2 API)</title>
<meta name="date" content="2017-11-10">
<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="TopicPartitionInfo (kafka 0.11.0.2 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="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/kafka/common/TopicPartition.html" title="class in org.apache.kafka.common"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/kafka/common/TopicPartitionInfo.html" target="_top">Frames</a></li>
<li><a href="TopicPartitionInfo.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><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&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.kafka.common</div>
<h2 title="Class TopicPartitionInfo" class="title">Class TopicPartitionInfo</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.kafka.common.TopicPartitionInfo</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">TopicPartitionInfo</span>
extends java.lang.Object</pre>
<div class="block">A class containing leadership, replicas and ISR information for a topic partition.</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">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/kafka/common/TopicPartitionInfo.html#TopicPartitionInfo(int,%20org.apache.kafka.common.Node,%20java.util.List,%20java.util.List)">TopicPartitionInfo</a></strong>(int&nbsp;partition,
<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&nbsp;leader,
java.util.List&lt;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&gt;&nbsp;replicas,
java.util.List&lt;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&gt;&nbsp;isr)</code>
<div class="block">Create an instance of this class with the provided parameters.</div>
</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">&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>java.util.List&lt;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/TopicPartitionInfo.html#isr()">isr</a></strong>()</code>
<div class="block">Return the in-sync replicas of the partition.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/TopicPartitionInfo.html#leader()">leader</a></strong>()</code>
<div class="block">Return the leader of the partition or null if there is none.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/TopicPartitionInfo.html#partition()">partition</a></strong>()</code>
<div class="block">Return the partition id.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/TopicPartitionInfo.html#replicas()">replicas</a></strong>()</code>
<div class="block">Return the replicas of the partition in the same order as the replica assignment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/TopicPartitionInfo.html#toString()">toString</a></strong>()</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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="TopicPartitionInfo(int, org.apache.kafka.common.Node, java.util.List, java.util.List)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TopicPartitionInfo</h4>
<pre>public&nbsp;TopicPartitionInfo(int&nbsp;partition,
<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&nbsp;leader,
java.util.List&lt;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&gt;&nbsp;replicas,
java.util.List&lt;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&gt;&nbsp;isr)</pre>
<div class="block">Create an instance of this class with the provided parameters.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partition</code> - the partition id</dd><dd><code>leader</code> - the leader of the partition or <a href="../../../../org/apache/kafka/common/Node.html#noNode()"><code>Node.noNode()</code></a> if there is none.</dd><dd><code>replicas</code> - the replicas of the partition in the same order as the replica assignment (the preferred replica
is the head of the list)</dd><dd><code>isr</code> - the in-sync replicas</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="partition()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>partition</h4>
<pre>public&nbsp;int&nbsp;partition()</pre>
<div class="block">Return the partition id.</div>
</li>
</ul>
<a name="leader()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>leader</h4>
<pre>public&nbsp;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&nbsp;leader()</pre>
<div class="block">Return the leader of the partition or null if there is none.</div>
</li>
</ul>
<a name="replicas()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>replicas</h4>
<pre>public&nbsp;java.util.List&lt;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&gt;&nbsp;replicas()</pre>
<div class="block">Return the replicas of the partition in the same order as the replica assignment. The preferred replica is the
head of the list.
Brokers with version lower than 0.11.0.0 return the replicas in unspecified order due to a bug.</div>
</li>
</ul>
<a name="isr()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isr</h4>
<pre>public&nbsp;java.util.List&lt;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&gt;&nbsp;isr()</pre>
<div class="block">Return the in-sync replicas of the partition. Note that the ordering of the result is unspecified.</div>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;java.lang.String&nbsp;toString()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></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="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/kafka/common/TopicPartition.html" title="class in org.apache.kafka.common"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/kafka/common/TopicPartitionInfo.html" target="_top">Frames</a></li>
<li><a href="TopicPartitionInfo.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><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>