public static io.vertx.ext.consul.ConsulService listEventsWithOptions(io.vertx.ext.consul.ConsulService j_receiver, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.listEventsWithOptions(options != null ? new io.vertx.ext.consul.EventListOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.EventList>>() { public void handle(io.vertx.core.AsyncResult<io.vertx.ext.consul.EventList> ar) { resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null)); } } : null)); return j_receiver; } public static io.vertx.ext.consul.ConsulService registerService(io.vertx.ext.consul.ConsulService j_receiver, java.util.Map<String, Object> serviceOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) {
public static io.vertx.ext.consul.ConsulClient listEventsWithOptions(io.vertx.ext.consul.ConsulClient j_receiver, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.listEventsWithOptions(options != null ? new io.vertx.ext.consul.EventListOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.EventList>>() { public void handle(io.vertx.core.AsyncResult<io.vertx.ext.consul.EventList> ar) { resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null)); } } : null)); return j_receiver; } public static io.vertx.ext.consul.ConsulClient registerService(io.vertx.ext.consul.ConsulClient j_receiver, java.util.Map<String, Object> serviceOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler) {
@Override void wait(long index, Handler<AsyncResult<State<EventList>>> handler) { BlockingQueryOptions bOpts = new BlockingQueryOptions().setWait(BLOCKING_WAIT).setIndex(index); EventListOptions eOpts = new EventListOptions().setBlockingOptions(bOpts).setName(event); consulClient.listEventsWithOptions(eOpts, h -> handler.handle(h.map(events -> new State<EventList>(events, events.getIndex())))); } }
.count(); tc.assertEquals(cnt1, (long) 1); ctx.writeClient().listEventsWithOptions(new EventListOptions().setName(name2), tc.asyncAssertSuccess(list2 -> { tc.assertEquals(list2.getList().size(), 0); Async async = tc.async(2); blockingQueryOptions.setWait("2s"); ctx.writeClient().listEventsWithOptions(new EventListOptions().setBlockingOptions(blockingQueryOptions), tc.asyncAssertSuccess(h -> { List<String> names = h.getList().stream().map(Event::getName).collect(Collectors.toList()); if (timeout) { tc.assertEquals(async.count(), timeout ? 1 : 2); ctx.writeClient().fireEvent(name2, tc.asyncAssertSuccess(ev -> { ctx.writeClient().listEventsWithOptions(new EventListOptions().setName(name2), tc.asyncAssertSuccess(list3 -> { tc.assertEquals(list3.getList().size(), 1); async.complete();