public class MetadataClient extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MetadataClient.ClusterAndGeneration |
static class |
MetadataClient.ClusterMetadata |
Constructor and Description |
---|
MetadataClient(KafkaCruiseControlConfig config,
long metadataTTLMs,
org.apache.kafka.common.utils.Time time,
org.apache.kafka.clients.admin.ConfluentAdmin adminClient) |
Modifier and Type | Method and Description |
---|---|
org.apache.kafka.common.Cluster |
cluster()
Get the current cluster.
|
MetadataClient.ClusterAndGeneration |
clusterAndGeneration()
Get the current cluster and generation
|
MetadataClient.ClusterAndGeneration |
forceRefreshMetadata()
Force-refresh metadata, paying no attention to how recently it has been refreshed.
|
MetadataClient.ClusterAndGeneration |
refreshMetadata()
Refresh the metadata.
|
MetadataClient.ClusterAndGeneration |
refreshMetadata(int timeoutMs)
Refresh the metadata, but bound the wait time for the call.
|
MetadataClient.ClusterAndGeneration |
refreshMetadata(int timeoutMs,
boolean force) |
public MetadataClient(KafkaCruiseControlConfig config, long metadataTTLMs, org.apache.kafka.common.utils.Time time, org.apache.kafka.clients.admin.ConfluentAdmin adminClient)
public MetadataClient.ClusterAndGeneration refreshMetadata()
public MetadataClient.ClusterAndGeneration forceRefreshMetadata()
public MetadataClient.ClusterAndGeneration refreshMetadata(int timeoutMs)
public MetadataClient.ClusterAndGeneration refreshMetadata(int timeoutMs, boolean force)
public MetadataClient.ClusterAndGeneration clusterAndGeneration()
public org.apache.kafka.common.Cluster cluster()