Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<AdminUtils> |
__TYPE_ARG |
Constructor and Description |
---|
AdminUtils(AdminUtils delegate) |
Modifier and Type | Method and Description |
---|---|
void |
changeTopicConfig(String topicName,
Map<String,String> topicConfig,
Handler<AsyncResult<Void>> completionHandler)
Updates the configuration of the topic given by topicName.
|
void |
close(Handler<AsyncResult<Void>> completionHandler)
Closes the underlying connection to Zookeeper.
|
static AdminUtils |
create(Vertx vertx,
String zookeeperHosts)
Create a new AdminUtils instance
|
static AdminUtils |
create(Vertx vertx,
String zookeeperHosts,
boolean autoClose)
Create a new AdminUtils instance
|
static AdminUtils |
create(Vertx vertx,
String zookeeperHosts,
int connectionTimeoutMs,
boolean isSecure,
boolean autoClose)
Create a new AdminUtils instance
|
void |
createTopic(String topicName,
int partitionCount,
int replicationFactor,
Handler<AsyncResult<Void>> completionHandler)
Creates a new Kafka topic on all Brokers managed by the given Zookeeper instance(s)
|
void |
createTopic(String topicName,
int partitionCount,
int replicationFactor,
Map<String,String> topicConfig,
Handler<AsyncResult<Void>> completionHandler)
Creates a new Kafka topic on all Brokers managed by the given Zookeeper instance(s).
|
void |
deleteTopic(String topicName,
Handler<AsyncResult<Void>> completionHandler)
Delete the Kafka topic given by the topicName.
|
boolean |
equals(Object o) |
AdminUtils |
getDelegate() |
int |
hashCode() |
static AdminUtils |
newInstance(AdminUtils arg) |
rx.Single<Void> |
rxChangeTopicConfig(String topicName,
Map<String,String> topicConfig)
Updates the configuration of the topic given by topicName.
|
rx.Single<Void> |
rxClose()
Closes the underlying connection to Zookeeper.
|
rx.Single<Void> |
rxCreateTopic(String topicName,
int partitionCount,
int replicationFactor)
Creates a new Kafka topic on all Brokers managed by the given Zookeeper instance(s)
|
rx.Single<Void> |
rxCreateTopic(String topicName,
int partitionCount,
int replicationFactor,
Map<String,String> topicConfig)
Creates a new Kafka topic on all Brokers managed by the given Zookeeper instance(s).
|
rx.Single<Void> |
rxDeleteTopic(String topicName)
Delete the Kafka topic given by the topicName.
|
rx.Single<Boolean> |
rxTopicExists(String topicName)
Checks if the Kafka topic given by topicName does exist.
|
void |
topicExists(String topicName,
Handler<AsyncResult<Boolean>> completionHandler)
Checks if the Kafka topic given by topicName does exist.
|
String |
toString() |
public static final io.vertx.lang.rx.TypeArg<AdminUtils> __TYPE_ARG
public AdminUtils(AdminUtils delegate)
public AdminUtils getDelegate()
public static AdminUtils create(Vertx vertx, String zookeeperHosts)
vertx
- Vert.x instance to usezookeeperHosts
- comma-separated list of Zookeeper server, e.g. localhost:2181,localhost:2182public static AdminUtils create(Vertx vertx, String zookeeperHosts, boolean autoClose)
vertx
- Vert.x instance to usezookeeperHosts
- comma-separated list of Zookeeper server, e.g. localhost:2181,localhost:2182autoClose
- If set to true, the client will auto-close the connection after a commandpublic static AdminUtils create(Vertx vertx, String zookeeperHosts, int connectionTimeoutMs, boolean isSecure, boolean autoClose)
vertx
- Vert.x instance to usezookeeperHosts
- comma-separated list of Zookeeper server, e.g. localhost:2181,localhost:2182connectionTimeoutMs
- Maximum time in ms to wait for the client to connect to ZookeeperisSecure
- If set to true, ZkUtils will perform security checks, i.e. ACL checksautoClose
- If set to true, the client will auto-close the connection after a commandpublic void createTopic(String topicName, int partitionCount, int replicationFactor, Handler<AsyncResult<Void>> completionHandler)
topicName
- Name of the to-be-created topicpartitionCount
- Number of partitionsreplicationFactor
- Number of replicates. Must be lower or equal to the number of available BrokerscompletionHandler
- vert.x callbackpublic rx.Single<Void> rxCreateTopic(String topicName, int partitionCount, int replicationFactor)
topicName
- Name of the to-be-created topicpartitionCount
- Number of partitionsreplicationFactor
- Number of replicates. Must be lower or equal to the number of available Brokerspublic void createTopic(String topicName, int partitionCount, int replicationFactor, Map<String,String> topicConfig, Handler<AsyncResult<Void>> completionHandler)
createTopic(java.lang.String, int, int, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
, one can pass in additional configuration
parameters as a map (String -> String).topicName
- Name of the to-be-created topicpartitionCount
- Number of partitionsreplicationFactor
- Number of replicates. Must be lower or equal to the number of available BrokerstopicConfig
- map with additional topic configuration parameterscompletionHandler
- vert.x callbackpublic rx.Single<Void> rxCreateTopic(String topicName, int partitionCount, int replicationFactor, Map<String,String> topicConfig)
createTopic(java.lang.String, int, int, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
, one can pass in additional configuration
parameters as a map (String -> String).topicName
- Name of the to-be-created topicpartitionCount
- Number of partitionsreplicationFactor
- Number of replicates. Must be lower or equal to the number of available BrokerstopicConfig
- map with additional topic configuration parameterspublic void deleteTopic(String topicName, Handler<AsyncResult<Void>> completionHandler)
topicName
- Name of the topic to be deletedcompletionHandler
- vert.x callbackpublic rx.Single<Void> rxDeleteTopic(String topicName)
topicName
- Name of the topic to be deletedpublic void topicExists(String topicName, Handler<AsyncResult<Boolean>> completionHandler)
topicName
- Name of the topiccompletionHandler
- vert.x callbackpublic rx.Single<Boolean> rxTopicExists(String topicName)
topicName
- Name of the topicpublic void changeTopicConfig(String topicName, Map<String,String> topicConfig, Handler<AsyncResult<Void>> completionHandler)
topicName
- topic to be configuredtopicConfig
- Map with configuration itemscompletionHandler
- vert.x callbackpublic rx.Single<Void> rxChangeTopicConfig(String topicName, Map<String,String> topicConfig)
topicName
- topic to be configuredtopicConfig
- Map with configuration itemspublic void close(Handler<AsyncResult<Void>> completionHandler)
completionHandler
- vert.x callbackpublic rx.Single<Void> rxClose()
public static AdminUtils newInstance(AdminUtils arg)
Copyright © 2018 Eclipse. All rights reserved.