/** * Get the partition metadata for the give topic. * @param topic topic partition for which getting partitions info * @param handler handler called on operation completed * @return current KafkaProducer instance */ public io.vertx.rxjava.kafka.client.producer.KafkaProducer<K, V> partitionsFor(String topic, Handler<AsyncResult<List<PartitionInfo>>> handler) { delegate.partitionsFor(topic, handler); return this; }
/** * Get the partition metadata for the give topic. * @param topic topic partition for which getting partitions info * @param handler handler called on operation completed * @return current KafkaProducer instance */ public io.vertx.rxjava.kafka.client.producer.KafkaProducer<K, V> partitionsFor(String topic, Handler<AsyncResult<List<PartitionInfo>>> handler) { delegate.partitionsFor(topic, handler); return this; }
public static io.vertx.kafka.client.producer.KafkaProducer<java.lang.Object,java.lang.Object> partitionsFor(io.vertx.kafka.client.producer.KafkaProducer<Object, Object> j_receiver, java.lang.String topic, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<java.util.Map<String, Object>>>> handler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.partitionsFor(topic, handler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.List<io.vertx.kafka.client.common.PartitionInfo>>>() { public void handle(io.vertx.core.AsyncResult<java.util.List<io.vertx.kafka.client.common.PartitionInfo>> ar) { handler.handle(ar.map(event -> event != null ? event.stream().map(elt -> elt != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(elt.toJson()) : null).collect(java.util.stream.Collectors.toList()) : null)); } } : null)); return j_receiver; } }