diff --git a/frameworks/Java/vertx/pom.xml b/frameworks/Java/vertx/pom.xml
index 15bac6dd2a4..7bac1baa546 100644
--- a/frameworks/Java/vertx/pom.xml
+++ b/frameworks/Java/vertx/pom.xml
@@ -10,8 +10,8 @@
17
vertx.App
- 5.0.0.CR6
- 4.2.0.Final
+ 5.0.0.CR8
+ 4.2.1.Final
2.16.1
diff --git a/frameworks/Java/vertx/src/main/java/vertx/App.java b/frameworks/Java/vertx/src/main/java/vertx/App.java
index 9cadce1efbb..f2d54510503 100755
--- a/frameworks/Java/vertx/src/main/java/vertx/App.java
+++ b/frameworks/Java/vertx/src/main/java/vertx/App.java
@@ -36,7 +36,7 @@
import java.util.stream.Collectors;
import java.util.stream.IntStream;
-public class App extends AbstractVerticle implements Handler {
+public class App extends VerticleBase implements Handler {
private static final int NUM_PROCESSORS = Runtime.getRuntime().availableProcessors();
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(App.class);
@@ -147,7 +147,7 @@ private MultiMap jsonHeaders() {
}
@Override
- public void start(Promise startPromise) throws Exception {
+ public Future> start() throws Exception {
int port = 8080;
server = vertx
.createHttpServer(new HttpServerOptions()
@@ -173,13 +173,11 @@ public void start(Promise startPromise) throws Exception {
options.setPreparedStatementCacheMaxSize(1024);
options.setPipeliningLimit(256); // Large pipelining means less flushing and we use a single connection anyway
Future> clientsInit = initClients(options);
- clientsInit
+ return clientsInit
.transform(ar -> {
databaseErr = ar.cause();
return server.listen(port);
- })
- .mapEmpty()
- .onComplete(startPromise);
+ });
}
private Future> initClients(PgConnectOptions options) {
@@ -275,8 +273,8 @@ public void handle(HttpServerRequest request) {
}
@Override
- public void stop() {
- if (server != null) server.close();
+ public Future> stop() throws Exception {
+ return server != null ? server.close() : super.stop();
}
private void sendError(HttpServerRequest req, Throwable cause) {
@@ -338,7 +336,7 @@ public Queries(HttpServerRequest req) {
}
private void handle() {
- client.group(c -> {
+ client.group(/*queries, */c -> {
for (int i = 0; i < queries; i++) {
c.preparedQuery(SELECT_WORLD)
.execute(Tuple.of(boxedRandomWorldNumber()))
@@ -385,7 +383,7 @@ public Update(HttpServerRequest request) {
}
public void handle() {
- client.group(c -> {
+ client.group(/*worldsToUpdate.length, */c -> {
final PreparedQuery> preparedQuery = c.preparedQuery(App.SELECT_WORLD);
for (int i = 0; i < worldsToUpdate.length; i++) {
final Integer id = boxedRandomWorldNumber();