Package org.apache.kafka.common
Class ClusterResource
- java.lang.Object
-
- org.apache.kafka.common.ClusterResource
-
public class ClusterResource extends java.lang.Object
TheClusterResource
class encapsulates metadata for a Kafka cluster.
-
-
Constructor Summary
Constructors Constructor Description ClusterResource(java.lang.String clusterId)
CreateClusterResource
with a cluster id.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
clusterId()
Return the cluster id.boolean
equals(java.lang.Object o)
int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
ClusterResource
public ClusterResource(java.lang.String clusterId)
CreateClusterResource
with a cluster id. Note that cluster id may benull
if the metadata request was sent to a broker without support for cluster ids. The first version of Kafka to support cluster id is 0.10.1.0.- Parameters:
clusterId
-
-
-
Method Detail
-
clusterId
public java.lang.String clusterId()
Return the cluster id. Note that it may benull
if the metadata request was sent to a broker without support for cluster ids. The first version of Kafka to support cluster id is 0.10.1.0.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-