@InterfaceStability.Evolving public abstract class AdminClient extends java.lang.Object implements java.lang.AutoCloseable
InterfaceStability
annotation and this notice once the API is considered stable.Constructor and Description |
---|
AdminClient() |
Modifier and Type | Method and Description |
---|---|
AlterConfigsResult |
alterConfigs(java.util.Map<ConfigResource,Config> configs)
Update the configuration for the specified resources with the default options.
|
abstract AlterConfigsResult |
alterConfigs(java.util.Map<ConfigResource,Config> configs,
AlterConfigsOptions options)
Update the configuration for the specified resources with the default options.
|
void |
close()
Close the AdminClient and release all associated resources.
|
abstract void |
close(long duration,
java.util.concurrent.TimeUnit unit)
Close the AdminClient and release all associated resources.
|
static AdminClient |
create(java.util.Map<java.lang.String,java.lang.Object> conf)
Create a new AdminClient with the given configuration.
|
static AdminClient |
create(java.util.Properties props)
Create a new AdminClient with the given configuration.
|
CreateAclsResult |
createAcls(java.util.Collection<AclBinding> acls)
Similar to #
AdminClient#createAcls(Collection ,
but uses the default options. |
abstract CreateAclsResult |
createAcls(java.util.Collection<AclBinding> acls,
CreateAclsOptions options)
Creates access control lists (ACLs) which are bound to specific resources.
|
CreateTopicsResult |
createTopics(java.util.Collection<NewTopic> newTopics)
Create a batch of new topics with the default options.
|
abstract CreateTopicsResult |
createTopics(java.util.Collection<NewTopic> newTopics,
CreateTopicsOptions options)
Create a batch of new topics.
|
DeleteAclsResult |
deleteAcls(java.util.Collection<AclBindingFilter> filters)
Similar to #
AdminClient#deleteAcls(Collection ,
but uses the default options. |
abstract DeleteAclsResult |
deleteAcls(java.util.Collection<AclBindingFilter> filters,
DeleteAclsOptions options)
Deletes access control lists (ACLs) according to the supplied filters.
|
DeleteTopicsResult |
deleteTopics(java.util.Collection<java.lang.String> topics)
Similar to #
AdminClient#deleteTopics(Collection ,
but uses the default options. |
abstract DeleteTopicsResult |
deleteTopics(java.util.Collection<java.lang.String> topics,
DeleteTopicsOptions options)
Delete a batch of topics.
|
DescribeAclsResult |
describeAcls(AclBindingFilter filter)
Similar to #
describeAcls(AclBindingFilter, DescribeAclsOptions) ,
but uses the default options. |
abstract DescribeAclsResult |
describeAcls(AclBindingFilter filter,
DescribeAclsOptions options)
Lists access control lists (ACLs) according to the supplied filter.
|
DescribeClusterResult |
describeCluster()
Get information about the nodes in the cluster, using the default options.
|
abstract DescribeClusterResult |
describeCluster(DescribeClusterOptions options)
Get information about the nodes in the cluster.
|
DescribeConfigsResult |
describeConfigs(java.util.Collection<ConfigResource> resources)
Get the configuration for the specified resources with the default options.
|
abstract DescribeConfigsResult |
describeConfigs(java.util.Collection<ConfigResource> resources,
DescribeConfigsOptions options)
Get the configuration for the specified resources.
|
DescribeTopicsResult |
describeTopics(java.util.Collection<java.lang.String> topicNames)
Describe some topics in the cluster, with the default options.
|
abstract DescribeTopicsResult |
describeTopics(java.util.Collection<java.lang.String> topicNames,
DescribeTopicsOptions options)
Describe some topics in the cluster.
|
ListTopicsResult |
listTopics()
List the topics available in the cluster with the default options.
|
abstract ListTopicsResult |
listTopics(ListTopicsOptions options)
List the topics available in the cluster.
|
public static AdminClient create(java.util.Properties props)
props
- The configuration.public static AdminClient create(java.util.Map<java.lang.String,java.lang.Object> conf)
conf
- The configuration.public void close()
close(long, TimeUnit)
close
in interface java.lang.AutoCloseable
public abstract void close(long duration, java.util.concurrent.TimeUnit unit)
duration
- The duration to use for the wait time.unit
- The time unit to use for the wait time.public CreateTopicsResult createTopics(java.util.Collection<NewTopic> newTopics)
newTopics
- The new topics to create.public abstract CreateTopicsResult createTopics(java.util.Collection<NewTopic> newTopics, CreateTopicsOptions options)
newTopics
- The new topics to create.options
- The options to use when creating the new topics.public DeleteTopicsResult deleteTopics(java.util.Collection<java.lang.String> topics)
AdminClient#deleteTopics(Collection, DeleteTopicsOptions)
,
but uses the default options.
This operation is supported by brokers with version 0.10.1.0 or higher.topics
- The topic names to delete.public abstract DeleteTopicsResult deleteTopics(java.util.Collection<java.lang.String> topics, DeleteTopicsOptions options)
topics
- The topic names to delete.options
- The options to use when deleting the topics.public ListTopicsResult listTopics()
public abstract ListTopicsResult listTopics(ListTopicsOptions options)
options
- The options to use when listing the topics.public DescribeTopicsResult describeTopics(java.util.Collection<java.lang.String> topicNames)
AdminClient#describeTopics(Collection, DescribeTopicsOptions)
topicNames
- The names of the topics to describe.public abstract DescribeTopicsResult describeTopics(java.util.Collection<java.lang.String> topicNames, DescribeTopicsOptions options)
topicNames
- The names of the topics to describe.options
- The options to use when describing the topic.public DescribeClusterResult describeCluster()
public abstract DescribeClusterResult describeCluster(DescribeClusterOptions options)
options
- The options to use when getting information about the cluster.public DescribeAclsResult describeAcls(AclBindingFilter filter)
describeAcls(AclBindingFilter, DescribeAclsOptions)
,
but uses the default options.
This operation is supported by brokers with version 0.11.0.0 or higher.filter
- The filter to use.public abstract DescribeAclsResult describeAcls(AclBindingFilter filter, DescribeAclsOptions options)
filter
- The filter to use.options
- The options to use when listing the ACLs.public CreateAclsResult createAcls(java.util.Collection<AclBinding> acls)
AdminClient#createAcls(Collection, CreateAclsOptions)
,
but uses the default options.
This operation is supported by brokers with version 0.11.0.0 or higher.acls
- The ACLs to createpublic abstract CreateAclsResult createAcls(java.util.Collection<AclBinding> acls, CreateAclsOptions options)
acls
- The ACLs to createoptions
- The options to use when creating the ACLs.public DeleteAclsResult deleteAcls(java.util.Collection<AclBindingFilter> filters)
AdminClient#deleteAcls(Collection, DeleteAclsOptions)
,
but uses the default options.
This operation is supported by brokers with version 0.11.0.0 or higher.filters
- The filters to use.public abstract DeleteAclsResult deleteAcls(java.util.Collection<AclBindingFilter> filters, DeleteAclsOptions options)
filters
- The filters to use.options
- The options to use when deleting the ACLs.public DescribeConfigsResult describeConfigs(java.util.Collection<ConfigResource> resources)
describeConfigs(Collection, DescribeConfigsOptions)
for more details.
This operation is supported by brokers with version 0.11.0.0 or higher.resources
- The resources (topic and broker resource types are currently supported)public abstract DescribeConfigsResult describeConfigs(java.util.Collection<ConfigResource> resources, DescribeConfigsOptions options)
null
so that sensitive information
is not disclosed.
Config entries where isReadOnly() is true cannot be updated.
This operation is supported by brokers with version 0.11.0.0 or higher.resources
- The resources (topic and broker resource types are currently supported)options
- The options to use when describing configspublic AlterConfigsResult alterConfigs(java.util.Map<ConfigResource,Config> configs)
alterConfigs(Map, AlterConfigsOptions)
for more details.
This operation is supported by brokers with version 0.11.0.0 or higher.configs
- The resources with their configs (topic is the only resource type with configs that can
be updated currently)public abstract AlterConfigsResult alterConfigs(java.util.Map<ConfigResource,Config> configs, AlterConfigsOptions options)
configs
- The resources with their configs (topic is the only resource type with configs that can
be updated currently)options
- The options to use when describing configs