blob: 2d12ae8c1274c78bbae94691c88fcbd59a01241d [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 (9) on Wed Mar 28 12:12:59 BST 2018 -->
<title>Cluster (kafka 1.1.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="date" content="2018-03-28">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-1.10.2.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Cluster (kafka 1.1.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":9,"i2":10,"i3":10,"i4":9,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="fixedNav">
<!-- ========= 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="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>Prev&nbsp;Class</li>
<li><a href="../../../../org/apache/kafka/common/ClusterResource.html" title="class in org.apache.kafka.common"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/kafka/common/Cluster.html" target="_top">Frames</a></li>
<li><a href="Cluster.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><span>SEARCH:&nbsp;</span>
<input type="text" id="search" value=" " disabled="disabled">
<input type="reset" id="reset" value=" " disabled="disabled">
</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</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 ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="../../../../org/apache/kafka/common/package-summary.html">org.apache.kafka.common</a></div>
<h2 title="Class Cluster" class="title">Class Cluster</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.kafka.common.Cluster</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="typeNameLabel">Cluster</span>
extends java.lang.Object</pre>
<div class="block">A representation of a subset of the nodes, topics, and partitions in the Kafka cluster.</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="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#Cluster-java.lang.String-java.util.Collection-java.util.Collection-java.util.Set-java.util.Set-">Cluster</a></span>&#8203;(java.lang.String&nbsp;clusterId,
java.util.Collection&lt;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&gt;&nbsp;nodes,
java.util.Collection&lt;<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>&gt;&nbsp;partitions,
java.util.Set&lt;java.lang.String&gt;&nbsp;unauthorizedTopics,
java.util.Set&lt;java.lang.String&gt;&nbsp;internalTopics)</code></th>
<td class="colLast">
<div class="block">Create a new cluster with the given id, nodes and partitions</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#Cluster-java.lang.String-java.util.Collection-java.util.Collection-java.util.Set-java.util.Set-org.apache.kafka.common.Node-">Cluster</a></span>&#8203;(java.lang.String&nbsp;clusterId,
java.util.Collection&lt;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&gt;&nbsp;nodes,
java.util.Collection&lt;<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>&gt;&nbsp;partitions,
java.util.Set&lt;java.lang.String&gt;&nbsp;unauthorizedTopics,
java.util.Set&lt;java.lang.String&gt;&nbsp;internalTopics,
<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&nbsp;controller)</code></th>
<td class="colLast">
<div class="block">Create a new cluster with the given id, nodes and partitions</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="memberSummary" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#availablePartitionsForTopic-java.lang.String-">availablePartitionsForTopic</a></span>&#8203;(java.lang.String&nbsp;topic)</code></th>
<td class="colLast">
<div class="block">Get the list of available partitions for this topic</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/kafka/common/Cluster.html" title="class in org.apache.kafka.common">Cluster</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#bootstrap-java.util.List-">bootstrap</a></span>&#8203;(java.util.List&lt;java.net.InetSocketAddress&gt;&nbsp;addresses)</code></th>
<td class="colLast">
<div class="block">Create a "bootstrap" cluster using the given list of host/ports</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/kafka/common/ClusterResource.html" title="class in org.apache.kafka.common">ClusterResource</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#clusterResource--">clusterResource</a></span>&#8203;()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i3" 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>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#controller--">controller</a></span>&#8203;()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/kafka/common/Cluster.html" title="class in org.apache.kafka.common">Cluster</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#empty--">empty</a></span>&#8203;()</code></th>
<td class="colLast">
<div class="block">Create an empty cluster instance with no nodes and no topic-partitions.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.util.Set&lt;java.lang.String&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#internalTopics--">internalTopics</a></span>&#8203;()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#isBootstrapConfigured--">isBootstrapConfigured</a></span>&#8203;()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i7" 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>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#leaderFor-org.apache.kafka.common.TopicPartition-">leaderFor</a></span>&#8203;(<a href="../../../../org/apache/kafka/common/TopicPartition.html" title="class in org.apache.kafka.common">TopicPartition</a>&nbsp;topicPartition)</code></th>
<td class="colLast">
<div class="block">Get the current leader for the given topic-partition</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#nodeById-int-">nodeById</a></span>&#8203;(int&nbsp;id)</code></th>
<td class="colLast">
<div class="block">Get the node by the node id (or null if no such node exists)</div>
</td>
</tr>
<tr id="i9" 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>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#nodes--">nodes</a></span>&#8203;()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#partition-org.apache.kafka.common.TopicPartition-">partition</a></span>&#8203;(<a href="../../../../org/apache/kafka/common/TopicPartition.html" title="class in org.apache.kafka.common">TopicPartition</a>&nbsp;topicPartition)</code></th>
<td class="colLast">
<div class="block">Get the metadata for the specified partition</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>java.lang.Integer</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#partitionCountForTopic-java.lang.String-">partitionCountForTopic</a></span>&#8203;(java.lang.String&nbsp;topic)</code></th>
<td class="colLast">
<div class="block">Get the number of partitions for the given topic</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#partitionsForNode-int-">partitionsForNode</a></span>&#8203;(int&nbsp;nodeId)</code></th>
<td class="colLast">
<div class="block">Get the list of partitions whose leader is this node</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#partitionsForTopic-java.lang.String-">partitionsForTopic</a></span>&#8203;(java.lang.String&nbsp;topic)</code></th>
<td class="colLast">
<div class="block">Get the list of partitions for this topic</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>java.util.Set&lt;java.lang.String&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#topics--">topics</a></span>&#8203;()</code></th>
<td class="colLast">
<div class="block">Get all topics.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#toString--">toString</a></span>&#8203;()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>java.util.Set&lt;java.lang.String&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#unauthorizedTopics--">unauthorizedTopics</a></span>&#8203;()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/kafka/common/Cluster.html" title="class in org.apache.kafka.common">Cluster</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/Cluster.html#withPartitions-java.util.Map-">withPartitions</a></span>&#8203;(java.util.Map&lt;<a href="../../../../org/apache/kafka/common/TopicPartition.html" title="class in org.apache.kafka.common">TopicPartition</a>,<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>&gt;&nbsp;partitions)</code></th>
<td class="colLast">
<div class="block">Return a copy of this cluster combined with `partitions`.</div>
</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="Cluster-java.lang.String-java.util.Collection-java.util.Collection-java.util.Set-java.util.Set-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Cluster</h4>
<pre>public&nbsp;Cluster&#8203;(java.lang.String&nbsp;clusterId,
java.util.Collection&lt;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&gt;&nbsp;nodes,
java.util.Collection&lt;<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>&gt;&nbsp;partitions,
java.util.Set&lt;java.lang.String&gt;&nbsp;unauthorizedTopics,
java.util.Set&lt;java.lang.String&gt;&nbsp;internalTopics)</pre>
<div class="block">Create a new cluster with the given id, nodes and partitions</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>nodes</code> - The nodes in the cluster</dd>
<dd><code>partitions</code> - Information about a subset of the topic-partitions this cluster hosts</dd>
</dl>
</li>
</ul>
<a name="Cluster-java.lang.String-java.util.Collection-java.util.Collection-java.util.Set-java.util.Set-org.apache.kafka.common.Node-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Cluster</h4>
<pre>public&nbsp;Cluster&#8203;(java.lang.String&nbsp;clusterId,
java.util.Collection&lt;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&gt;&nbsp;nodes,
java.util.Collection&lt;<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>&gt;&nbsp;partitions,
java.util.Set&lt;java.lang.String&gt;&nbsp;unauthorizedTopics,
java.util.Set&lt;java.lang.String&gt;&nbsp;internalTopics,
<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&nbsp;controller)</pre>
<div class="block">Create a new cluster with the given id, nodes and partitions</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>nodes</code> - The nodes in the cluster</dd>
<dd><code>partitions</code> - Information about a subset of the topic-partitions this cluster hosts</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="empty--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>empty</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/kafka/common/Cluster.html" title="class in org.apache.kafka.common">Cluster</a>&nbsp;empty&#8203;()</pre>
<div class="block">Create an empty cluster instance with no nodes and no topic-partitions.</div>
</li>
</ul>
<a name="bootstrap-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bootstrap</h4>
<pre>public static&nbsp;<a href="../../../../org/apache/kafka/common/Cluster.html" title="class in org.apache.kafka.common">Cluster</a>&nbsp;bootstrap&#8203;(java.util.List&lt;java.net.InetSocketAddress&gt;&nbsp;addresses)</pre>
<div class="block">Create a "bootstrap" cluster using the given list of host/ports</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>addresses</code> - The addresses</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A cluster for these hosts/ports</dd>
</dl>
</li>
</ul>
<a name="withPartitions-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withPartitions</h4>
<pre>public&nbsp;<a href="../../../../org/apache/kafka/common/Cluster.html" title="class in org.apache.kafka.common">Cluster</a>&nbsp;withPartitions&#8203;(java.util.Map&lt;<a href="../../../../org/apache/kafka/common/TopicPartition.html" title="class in org.apache.kafka.common">TopicPartition</a>,<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>&gt;&nbsp;partitions)</pre>
<div class="block">Return a copy of this cluster combined with `partitions`.</div>
</li>
</ul>
<a name="nodes--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nodes</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;nodes&#8203;()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The known set of nodes</dd>
</dl>
</li>
</ul>
<a name="nodeById-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nodeById</h4>
<pre>public&nbsp;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&nbsp;nodeById&#8203;(int&nbsp;id)</pre>
<div class="block">Get the node by the node id (or null if no such node exists)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - The id of the node</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The node, or null if no such node exists</dd>
</dl>
</li>
</ul>
<a name="leaderFor-org.apache.kafka.common.TopicPartition-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>leaderFor</h4>
<pre>public&nbsp;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&nbsp;leaderFor&#8203;(<a href="../../../../org/apache/kafka/common/TopicPartition.html" title="class in org.apache.kafka.common">TopicPartition</a>&nbsp;topicPartition)</pre>
<div class="block">Get the current leader for the given topic-partition</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topicPartition</code> - The topic and partition we want to know the leader for</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The node that is the leader for this topic-partition, or null if there is currently no leader</dd>
</dl>
</li>
</ul>
<a name="partition-org.apache.kafka.common.TopicPartition-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>partition</h4>
<pre>public&nbsp;<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>&nbsp;partition&#8203;(<a href="../../../../org/apache/kafka/common/TopicPartition.html" title="class in org.apache.kafka.common">TopicPartition</a>&nbsp;topicPartition)</pre>
<div class="block">Get the metadata for the specified partition</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topicPartition</code> - The topic and partition to fetch info for</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The metadata about the given topic and partition</dd>
</dl>
</li>
</ul>
<a name="partitionsForTopic-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>partitionsForTopic</h4>
<pre>public&nbsp;java.util.List&lt;<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>&gt;&nbsp;partitionsForTopic&#8203;(java.lang.String&nbsp;topic)</pre>
<div class="block">Get the list of partitions for this topic</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topic</code> - The topic name</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A list of partitions</dd>
</dl>
</li>
</ul>
<a name="partitionCountForTopic-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>partitionCountForTopic</h4>
<pre>public&nbsp;java.lang.Integer&nbsp;partitionCountForTopic&#8203;(java.lang.String&nbsp;topic)</pre>
<div class="block">Get the number of partitions for the given topic</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topic</code> - The topic to get the number of partitions for</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of partitions or null if there is no corresponding metadata</dd>
</dl>
</li>
</ul>
<a name="availablePartitionsForTopic-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>availablePartitionsForTopic</h4>
<pre>public&nbsp;java.util.List&lt;<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>&gt;&nbsp;availablePartitionsForTopic&#8203;(java.lang.String&nbsp;topic)</pre>
<div class="block">Get the list of available partitions for this topic</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topic</code> - The topic name</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A list of partitions</dd>
</dl>
</li>
</ul>
<a name="partitionsForNode-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>partitionsForNode</h4>
<pre>public&nbsp;java.util.List&lt;<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>&gt;&nbsp;partitionsForNode&#8203;(int&nbsp;nodeId)</pre>
<div class="block">Get the list of partitions whose leader is this node</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>nodeId</code> - The node id</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A list of partitions</dd>
</dl>
</li>
</ul>
<a name="topics--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>topics</h4>
<pre>public&nbsp;java.util.Set&lt;java.lang.String&gt;&nbsp;topics&#8203;()</pre>
<div class="block">Get all topics.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a set of all topics</dd>
</dl>
</li>
</ul>
<a name="unauthorizedTopics--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unauthorizedTopics</h4>
<pre>public&nbsp;java.util.Set&lt;java.lang.String&gt;&nbsp;unauthorizedTopics&#8203;()</pre>
</li>
</ul>
<a name="internalTopics--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>internalTopics</h4>
<pre>public&nbsp;java.util.Set&lt;java.lang.String&gt;&nbsp;internalTopics&#8203;()</pre>
</li>
</ul>
<a name="isBootstrapConfigured--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isBootstrapConfigured</h4>
<pre>public&nbsp;boolean&nbsp;isBootstrapConfigured&#8203;()</pre>
</li>
</ul>
<a name="clusterResource--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clusterResource</h4>
<pre>public&nbsp;<a href="../../../../org/apache/kafka/common/ClusterResource.html" title="class in org.apache.kafka.common">ClusterResource</a>&nbsp;clusterResource&#8203;()</pre>
</li>
</ul>
<a name="controller--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>controller</h4>
<pre>public&nbsp;<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>&nbsp;controller&#8203;()</pre>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;java.lang.String&nbsp;toString&#8203;()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></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>
<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="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>Prev&nbsp;Class</li>
<li><a href="../../../../org/apache/kafka/common/ClusterResource.html" title="class in org.apache.kafka.common"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/kafka/common/Cluster.html" target="_top">Frames</a></li>
<li><a href="Cluster.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</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>