public interface VertxBuilder
Vertx vertx = Vertx.builder().with(options).withMetrics(metricsFactory).build();
Modifier and Type | Method and Description |
---|---|
Vertx |
build()
Creates a non clustered instance.
|
Future<Vertx> |
buildClustered()
Creates a clustered instance.
|
default void |
buildClustered(Handler<AsyncResult<Vertx>> handler)
Creates a clustered instance.
|
VertxBuilder |
with(VertxOptions options)
Configure the Vert.x options.
|
VertxBuilder |
withClusterManager(ClusterManager clusterManager)
Programmatically set the cluster manager to be used when clustering.
|
VertxBuilder |
withMetrics(VertxMetricsFactory factory)
Programmatically set the metrics factory to be used when metrics are enabled.
|
VertxBuilder |
withTracer(VertxTracerFactory factory)
Programmatically set the tracer factory to be used when tracing are enabled.
|
VertxBuilder with(VertxOptions options)
options
- the Vert.x optionsVertxBuilder withMetrics(VertxMetricsFactory factory)
Only valid if MetricsOptions.isEnabled()
= true.
Normally Vert.x will look on the classpath for a metrics factory implementation, but if you want to set one programmatically you can use this method.
factory
- the metrics factoryVertxBuilder withTracer(VertxTracerFactory factory)
Normally Vert.x will look on the classpath for a tracer factory implementation, but if you want to set one programmatically you can use this method.
factory
- the tracer factoryVertxBuilder withClusterManager(ClusterManager clusterManager)
Only valid if clustered = true.
Normally Vert.x will look on the classpath for a cluster manager, but if you want to set one programmatically you can use this method.
clusterManager
- the cluster managerVertx build()
Future<Vertx> buildClustered()
The instance is created asynchronously and the returned future is completed with the result when it is ready.
default void buildClustered(Handler<AsyncResult<Vertx>> handler)
The instance is created asynchronously and the returned future is completed with the result when it is ready.
Copyright © 2024 Eclipse. All rights reserved.