Skip to content

Commit

Permalink
Update to vertx builder changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed Nov 20, 2023
1 parent f4b072e commit e00d31d
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/main/java/examples/Examples.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ public void example1() {

ClusterManager mgr = new HazelcastClusterManager();

VertxOptions options = new VertxOptions().setClusterManager(mgr);

Vertx
.clusteredVertx(options)
.builder()
.withClusterManager(mgr)
.buildClustered()
.onComplete(res -> {
if (res.succeeded()) {
Vertx vertx = res.result();
Expand All @@ -61,10 +61,10 @@ public void example2() {

ClusterManager mgr = new HazelcastClusterManager(hazelcastConfig);

VertxOptions options = new VertxOptions().setClusterManager(mgr);

Vertx
.clusteredVertx(options)
.builder()
.withClusterManager(mgr)
.buildClustered()
.onComplete(res -> {
if (res.succeeded()) {
Vertx vertx = res.result();
Expand All @@ -81,10 +81,10 @@ public void customizeDefaultConfig() {

ClusterManager mgr = new HazelcastClusterManager(hazelcastConfig);

VertxOptions options = new VertxOptions().setClusterManager(mgr);

Vertx
.clusteredVertx(options)
.builder()
.withClusterManager(mgr)
.buildClustered()
.onComplete(res -> {
if (res.succeeded()) {
Vertx vertx = res.result();
Expand All @@ -96,9 +96,10 @@ public void customizeDefaultConfig() {

public void example3(HazelcastInstance hazelcastInstance) {
ClusterManager mgr = new HazelcastClusterManager(hazelcastInstance);
VertxOptions options = new VertxOptions().setClusterManager(mgr);
Vertx
.clusteredVertx(options)
.builder()
.withClusterManager(mgr)
.buildClustered()
.onComplete(res -> {
if (res.succeeded()) {
Vertx vertx = res.result();
Expand All @@ -124,10 +125,10 @@ public void liteMemberConfig() {

ClusterManager mgr = new HazelcastClusterManager(hazelcastConfig);

VertxOptions options = new VertxOptions().setClusterManager(mgr);

Vertx
.clusteredVertx(options)
.builder()
.withClusterManager(mgr)
.buildClustered()
.onComplete(res -> {
if (res.succeeded()) {
Vertx vertx = res.result();
Expand Down

0 comments on commit e00d31d

Please sign in to comment.