public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, EventListOptions obj) { for (java.util.Map.Entry<String, Object> member : json) { switch (member.getKey()) { case "blockingOptions": if (member.getValue() instanceof JsonObject) { obj.setBlockingOptions(new io.vertx.ext.consul.BlockingQueryOptions((JsonObject)member.getValue())); } break; case "name": if (member.getValue() instanceof String) { obj.setName((String)member.getValue()); } break; } } }
@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); 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();