Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2019 Red Hat Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.vertx.kafka.admin;
import io.vertx.codegen.annotations.GenIgnore;
import io.vertx.core.Future;
import io.vertx.kafka.client.common.ConfigResource;
import org.apache.kafka.clients.admin.AdminClient;
import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.AsyncResult;
import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import io.vertx.kafka.admin.impl.KafkaAdminClientImpl;
import io.vertx.kafka.client.common.TopicPartition;
import io.vertx.kafka.client.consumer.OffsetAndMetadata;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
/**
* Vert.x Kafka Admin client implementation
*/
@VertxGen
public interface KafkaAdminClient {
/**
* Create a new KafkaAdminClient instance
*
* @param vertx Vert.x instance to use
* @param adminClient Kafka native Admin client instance
* @return an instance of the KafkaAdminClient
*/
@GenIgnore
static KafkaAdminClient create(Vertx vertx, AdminClient adminClient) {
return new KafkaAdminClientImpl(vertx, adminClient);
}
/**
* Create a new KafkaAdminClient instance
*
* @param vertx Vert.x instance to use
* @param config Kafka admin client configuration
* @return an instance of the KafkaAdminClient
*/
static KafkaAdminClient create(Vertx vertx, Map config) {
return create(vertx, AdminClient.create(new HashMap<>(config)));
}
/**
* Create a new KafkaAdminClient instance
*
* @param vertx Vert.x instance to use
* @param config Kafka admin client configuration
* @return an instance of the KafkaAdminClient
*/
@GenIgnore
static KafkaAdminClient create(Vertx vertx, Properties config) {
return create(vertx, AdminClient.create(config));
}
/**
* List the topics available in the cluster with the default options.
*
* @param completionHandler handler called on operation completed with the topics set
*/
void listTopics(Handler>> completionHandler);
/**
* Like {@link #listTopics(Handler)} but returns a {@code Future} of the asynchronous result
*/
Future> listTopics();
/**
* Describe some topics in the cluster, with the default options.
*
* @param topicNames the names of the topics to describe
* @param completionHandler handler called on operation completed with the topics descriptions
*/
void describeTopics(List topicNames, Handler>> completionHandler);
/**
* Like {@link #describeTopics(List, Handler)} but returns a {@code Future} of the asynchronous result
*/
Future