| <!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 Thu Aug 04 13:19:27 BST 2016 --> |
| <title>Cluster (kafka 0.10.0.1 API)</title> |
| <meta name="date" content="2016-08-04"> |
| <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="Cluster (kafka 0.10.0.1 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>Prev Class</li> |
| <li><a href="../../../../org/apache/kafka/common/Configurable.html" title="interface in org.apache.kafka.common"><span class="strong">Next 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 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"> |
| <div class="subTitle">org.apache.kafka.common</div> |
| <h2 title="Class Cluster" class="title">Class Cluster</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></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="strong">Cluster</span> |
| extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></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="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="../../../../org/apache/kafka/common/Cluster.html#Cluster(java.util.Collection,%20java.util.Collection,%20java.util.Set)">Cluster</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>> nodes, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>> partitions, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> unauthorizedTopics)</code> |
| <div class="block">Create a new cluster with the given 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="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><a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/Cluster.html#availablePartitionsForTopic(java.lang.String)">availablePartitionsForTopic</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> topic)</code> |
| <div class="block">Get the list of available partitions for this topic</div> |
| </td> |
| </tr> |
| <tr 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> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/Cluster.html#bootstrap(java.util.List)">bootstrap</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/net/InetSocketAddress.html?is-external=true" title="class or interface in java.net">InetSocketAddress</a>> addresses)</code> |
| <div class="block">Create a "bootstrap" cluster using the given list of host/ports</div> |
| </td> |
| </tr> |
| <tr 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> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/Cluster.html#empty()">empty</a></strong>()</code> |
| <div class="block">Create an empty cluster instance with no nodes and no topic-partitions.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/Cluster.html#isBootstrapConfigured()">isBootstrapConfigured</a></strong>()</code> </td> |
| </tr> |
| <tr 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> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/Cluster.html#leaderFor(org.apache.kafka.common.TopicPartition)">leaderFor</a></strong>(<a href="../../../../org/apache/kafka/common/TopicPartition.html" title="class in org.apache.kafka.common">TopicPartition</a> topicPartition)</code> |
| <div class="block">Get the current leader for the given topic-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/Cluster.html#nodeById(int)">nodeById</a></strong>(int id)</code> |
| <div class="block">Get the node by the node id (or null if no such node exists)</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<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/Cluster.html#nodes()">nodes</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/Cluster.html#partition(org.apache.kafka.common.TopicPartition)">partition</a></strong>(<a href="../../../../org/apache/kafka/common/TopicPartition.html" title="class in org.apache.kafka.common">TopicPartition</a> topicPartition)</code> |
| <div class="block">Get the metadata for the specified partition</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/Cluster.html#partitionCountForTopic(java.lang.String)">partitionCountForTopic</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> topic)</code> |
| <div class="block">Get the number of partitions for the given topic</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/Cluster.html#partitionsForNode(int)">partitionsForNode</a></strong>(int nodeId)</code> |
| <div class="block">Get the list of partitions whose leader is this node</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/Cluster.html#partitionsForTopic(java.lang.String)">partitionsForTopic</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> topic)</code> |
| <div class="block">Get the list of partitions for this topic</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/Cluster.html#topics()">topics</a></strong>()</code> |
| <div class="block">Get all topics.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/Cluster.html#toString()">toString</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/Cluster.html#unauthorizedTopics()">unauthorizedTopics</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/kafka/common/Cluster.html" title="class in org.apache.kafka.common">Cluster</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kafka/common/Cluster.html#withPartitions(java.util.Map)">withPartitions</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<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>> partitions)</code> |
| <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 java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></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.util.Collection, java.util.Collection, java.util.Set)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>Cluster</h4> |
| <pre>public Cluster(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>> nodes, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>> partitions, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> unauthorizedTopics)</pre> |
| <div class="block">Create a new cluster with the given nodes and partitions</div> |
| <dl><dt><span class="strong">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 <a href="../../../../org/apache/kafka/common/Cluster.html" title="class in org.apache.kafka.common">Cluster</a> empty()</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 <a href="../../../../org/apache/kafka/common/Cluster.html" title="class in org.apache.kafka.common">Cluster</a> bootstrap(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/net/InetSocketAddress.html?is-external=true" title="class or interface in java.net">InetSocketAddress</a>> addresses)</pre> |
| <div class="block">Create a "bootstrap" cluster using the given list of host/ports</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>addresses</code> - The addresses</dd> |
| <dt><span class="strong">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 <a href="../../../../org/apache/kafka/common/Cluster.html" title="class in org.apache.kafka.common">Cluster</a> withPartitions(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<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>> 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 <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a>> nodes()</pre> |
| <dl><dt><span class="strong">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 <a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a> nodeById(int id)</pre> |
| <div class="block">Get the node by the node id (or null if no such node exists)</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - The id of the node</dd> |
| <dt><span class="strong">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 <a href="../../../../org/apache/kafka/common/Node.html" title="class in org.apache.kafka.common">Node</a> leaderFor(<a href="../../../../org/apache/kafka/common/TopicPartition.html" title="class in org.apache.kafka.common">TopicPartition</a> topicPartition)</pre> |
| <div class="block">Get the current leader for the given topic-partition</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>topicPartition</code> - The topic and partition we want to know the leader for</dd> |
| <dt><span class="strong">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 <a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a> partition(<a href="../../../../org/apache/kafka/common/TopicPartition.html" title="class in org.apache.kafka.common">TopicPartition</a> topicPartition)</pre> |
| <div class="block">Get the metadata for the specified partition</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>topicPartition</code> - The topic and partition to fetch info for</dd> |
| <dt><span class="strong">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 <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>> partitionsForTopic(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> topic)</pre> |
| <div class="block">Get the list of partitions for this topic</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>topic</code> - The topic name</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>A list of partitions</dd></dl> |
| </li> |
| </ul> |
| <a name="availablePartitionsForTopic(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>availablePartitionsForTopic</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>> availablePartitionsForTopic(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> topic)</pre> |
| <div class="block">Get the list of available partitions for this topic</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>topic</code> - The topic name</dd> |
| <dt><span class="strong">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 <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/kafka/common/PartitionInfo.html" title="class in org.apache.kafka.common">PartitionInfo</a>> partitionsForNode(int nodeId)</pre> |
| <div class="block">Get the list of partitions whose leader is this node</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>nodeId</code> - The node id</dd> |
| <dt><span class="strong">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 <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> partitionCountForTopic(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> topic)</pre> |
| <div class="block">Get the number of partitions for the given topic</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>topic</code> - The topic to get the number of partitions for</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The number of partitions or null if there is no corresponding metadata</dd></dl> |
| </li> |
| </ul> |
| <a name="topics()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>topics</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> topics()</pre> |
| <div class="block">Get all topics.</div> |
| <dl><dt><span class="strong">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 <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> unauthorizedTopics()</pre> |
| </li> |
| </ul> |
| <a name="isBootstrapConfigured()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isBootstrapConfigured</h4> |
| <pre>public boolean isBootstrapConfigured()</pre> |
| </li> |
| </ul> |
| <a name="toString()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toString()</pre> |
| <dl> |
| <dt><strong>Overrides:</strong></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a></code> in class <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></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>Prev Class</li> |
| <li><a href="../../../../org/apache/kafka/common/Configurable.html" title="interface in org.apache.kafka.common"><span class="strong">Next 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 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> |