Skip to content

Commit a34d019

Browse files
committed
AbstractVerticle -> VerticleBase in examples
1 parent a59cd24 commit a34d019

File tree

4 files changed

+28
-32
lines changed

4 files changed

+28
-32
lines changed

vertx-db2-client/src/main/java/examples/SqlClientExamples.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
*/
1616
package examples;
1717

18-
import io.vertx.core.AbstractVerticle;
19-
import io.vertx.core.DeploymentOptions;
20-
import io.vertx.core.Future;
21-
import io.vertx.core.Vertx;
18+
import io.vertx.core.*;
2219
import io.vertx.core.tracing.TracingPolicy;
2320
import io.vertx.db2client.DB2Builder;
2421
import io.vertx.db2client.DB2ConnectOptions;
@@ -381,19 +378,20 @@ public void poolSharing1(Vertx vertx, DB2ConnectOptions database, int maxSize) {
381378
.connectingTo(database)
382379
.using(vertx)
383380
.build();
384-
vertx.deployVerticle(() -> new AbstractVerticle() {
381+
vertx.deployVerticle(() -> new VerticleBase() {
385382
@Override
386-
public void start() throws Exception {
383+
public Future<?> start() throws Exception {
387384
// Use the pool
385+
return super.start();
388386
}
389387
}, new DeploymentOptions().setInstances(4));
390388
}
391389

392390
public void poolSharing2(Vertx vertx, DB2ConnectOptions database, int maxSize) {
393-
vertx.deployVerticle(() -> new AbstractVerticle() {
391+
vertx.deployVerticle(() -> new VerticleBase() {
394392
Pool pool;
395393
@Override
396-
public void start() {
394+
public Future<?> start() throws Exception {
397395
// Get or create a shared pool
398396
// this actually creates a lease to the pool
399397
// when the verticle is undeployed, the lease will be released automaticaly
@@ -405,6 +403,7 @@ public void start() {
405403
.connectingTo(database)
406404
.using(vertx)
407405
.build();
406+
return super.start();
408407
}
409408
}, new DeploymentOptions().setInstances(4));
410409
}

vertx-mssql-client/src/main/java/examples/SqlClientExamples.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
*/
1717
package examples;
1818

19-
import io.vertx.core.AbstractVerticle;
20-
import io.vertx.core.DeploymentOptions;
21-
import io.vertx.core.Future;
22-
import io.vertx.core.Vertx;
19+
import io.vertx.core.*;
2320
import io.vertx.core.tracing.TracingPolicy;
2421
import io.vertx.docgen.Source;
2522
import io.vertx.mssqlclient.MSSQLBuilder;
@@ -390,19 +387,20 @@ public void poolSharing1(Vertx vertx, MSSQLConnectOptions database, int maxSize)
390387
.connectingTo(database)
391388
.using(vertx)
392389
.build();
393-
vertx.deployVerticle(() -> new AbstractVerticle() {
390+
vertx.deployVerticle(() -> new VerticleBase() {
394391
@Override
395-
public void start() throws Exception {
392+
public Future<?> start() throws Exception {
396393
// Use the pool
394+
return super.start();
397395
}
398396
}, new DeploymentOptions().setInstances(4));
399397
}
400398

401399
public void poolSharing2(Vertx vertx, MSSQLConnectOptions database, int maxSize) {
402-
vertx.deployVerticle(() -> new AbstractVerticle() {
400+
vertx.deployVerticle(() -> new VerticleBase() {
403401
Pool pool;
404402
@Override
405-
public void start() {
403+
public Future<?> start() throws Exception {
406404
// Get or create a shared pool
407405
// this actually creates a lease to the pool
408406
// when the verticle is undeployed, the lease will be released automaticaly
@@ -413,6 +411,7 @@ public void start() {
413411
.setName("my-pool"))
414412
.using(vertx)
415413
.build();
414+
return super.start();
416415
}
417416
}, new DeploymentOptions().setInstances(4));
418417
}

vertx-mysql-client/src/main/java/examples/SqlClientExamples.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
*/
1717
package examples;
1818

19-
import io.vertx.core.AbstractVerticle;
20-
import io.vertx.core.DeploymentOptions;
21-
import io.vertx.core.Future;
22-
import io.vertx.core.Vertx;
19+
import io.vertx.core.*;
2320
import io.vertx.core.tracing.TracingPolicy;
2421
import io.vertx.docgen.Source;
2522
import io.vertx.mysqlclient.MySQLBuilder;
@@ -361,19 +358,20 @@ public void poolSharing1(Vertx vertx, MySQLConnectOptions database, int maxSize)
361358
.connectingTo(database)
362359
.using(vertx)
363360
.build();
364-
vertx.deployVerticle(() -> new AbstractVerticle() {
361+
vertx.deployVerticle(() -> new VerticleBase() {
365362
@Override
366-
public void start() throws Exception {
363+
public Future<?> start() throws Exception {
367364
// Use the pool
365+
return super.start();
368366
}
369367
}, new DeploymentOptions().setInstances(4));
370368
}
371369

372370
public void poolSharing2(Vertx vertx, MySQLConnectOptions database, int maxSize) {
373-
vertx.deployVerticle(() -> new AbstractVerticle() {
371+
vertx.deployVerticle(() -> new VerticleBase() {
374372
Pool pool;
375373
@Override
376-
public void start() {
374+
public Future<?> start() throws Exception {
377375
// Get or create a shared pool
378376
// this actually creates a lease to the pool
379377
// when the verticle is undeployed, the lease will be released automaticaly
@@ -384,6 +382,7 @@ public void start() {
384382
.setName("my-pool"))
385383
.using(vertx)
386384
.build();
385+
return super.start();
387386
}
388387
}, new DeploymentOptions().setInstances(4));
389388
}

vertx-pg-client/src/main/java/examples/SqlClientExamples.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
*/
1717
package examples;
1818

19-
import io.vertx.core.AbstractVerticle;
20-
import io.vertx.core.DeploymentOptions;
21-
import io.vertx.core.Future;
22-
import io.vertx.core.Vertx;
19+
import io.vertx.core.*;
2320
import io.vertx.core.tracing.TracingPolicy;
2421
import io.vertx.docgen.Source;
2522
import io.vertx.pgclient.PgBuilder;
@@ -381,19 +378,20 @@ public void poolConfig02(ClientBuilder<?> builder, String sql) {
381378

382379
public void poolSharing1(Vertx vertx, PgConnectOptions database, int maxSize) {
383380
Pool pool = Pool.pool(database, new PoolOptions().setMaxSize(maxSize));
384-
vertx.deployVerticle(() -> new AbstractVerticle() {
381+
vertx.deployVerticle(() -> new VerticleBase() {
385382
@Override
386-
public void start() throws Exception {
383+
public Future<?> start() throws Exception {
387384
// Use the pool
385+
return super.start();
388386
}
389387
}, new DeploymentOptions().setInstances(4));
390388
}
391389

392390
public void poolSharing2(Vertx vertx, PgConnectOptions database, int maxSize) {
393-
vertx.deployVerticle(() -> new AbstractVerticle() {
391+
vertx.deployVerticle(() -> new VerticleBase() {
394392
Pool pool;
395393
@Override
396-
public void start() {
394+
public Future<?> start() throws Exception {
397395
// Get or create a shared pool
398396
// this actually creates a lease to the pool
399397
// when the verticle is undeployed, the lease will be released automaticaly
@@ -405,6 +403,7 @@ public void start() {
405403
.connectingTo(database)
406404
.using(vertx)
407405
.build();
406+
return super.start();
408407
}
409408
}, new DeploymentOptions().setInstances(4));
410409
}

0 commit comments

Comments
 (0)