1、通过集群管理器获取
IgniteClusterManager clusterManager = new IgniteClusterManager();
VertxOptions options = new VertxOptions().setClusterManager(clusterManager);
Vertx.clusteredVertx(options, ar -> {
if (ar.failed()) {
System.err.println("Cannot create vert.x instance : " + ar.cause());
} else {
Vertx vertx = ar.result();
vertx.deployVerticle(CacheApp.class.getName());
}
Ignite nit = clusterManager.getIgniteInstance();
});
2、通过Ignition工厂获取
ClusterManager clusterManager = ((VertxInternal) vertx).getClusterManager();
String uuid = clusterManager.getNodeID();
Ignite nit = Ignition.ignite(UUID.fromString(uuid));