Package io.vertx.mutiny.core
Class VertxBuilder
- java.lang.Object
-
- io.vertx.mutiny.core.VertxBuilder
-
public class VertxBuilder extends Object
A builder for creating Vert.x instances, allowing to configure Vert.x plugins:- metrics
- tracing
- cluster manager
NOTE: This class has been automatically generated from theVertx vertx = Vertx.builder().with(options).withMetrics(metricsFactory).build();
original
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<VertxBuilder>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description VertxBuilder(io.vertx.core.VertxBuilder delegate)
VertxBuilder(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vertx
build()
io.smallrye.mutiny.Uni<Vertx>
buildClustered()
Creates a clustered instance.Vertx
buildClusteredAndAwait()
Blocking variant ofbuildClustered()
.void
buildClusteredAndForget()
Variant ofbuildClustered()
that ignores the result of the operation.boolean
equals(Object o)
io.vertx.core.VertxBuilder
getDelegate()
int
hashCode()
static VertxBuilder
newInstance(io.vertx.core.VertxBuilder arg)
String
toString()
VertxBuilder
with(io.vertx.core.VertxOptions options)
VertxBuilder
withClusterManager(io.vertx.core.spi.cluster.ClusterManager clusterManager)
VertxBuilder
withMetrics(io.vertx.core.spi.VertxMetricsFactory factory)
VertxBuilder
withTracer(io.vertx.core.spi.VertxTracerFactory factory)
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<VertxBuilder> __TYPE_ARG
-
-
Constructor Detail
-
VertxBuilder
public VertxBuilder(io.vertx.core.VertxBuilder delegate)
-
VertxBuilder
public VertxBuilder(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.core.VertxBuilder getDelegate()
-
with
public VertxBuilder with(io.vertx.core.VertxOptions options)
- Parameters:
options
- the Vert.x options- Returns:
- a reference to this, so the API can be used fluently
-
build
public Vertx build()
- Returns:
- the instance
-
buildClustered
@CheckReturnValue public io.smallrye.mutiny.Uni<Vertx> buildClustered()
Creates a clustered instance.The instance is created asynchronously and the returned future is completed with the result when it is ready.
Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
buildClusteredAndAwait
public Vertx buildClusteredAndAwait()
Blocking variant ofbuildClustered()
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Returns:
- the Vertx instance produced by the operation.
-
buildClusteredAndForget
public void buildClusteredAndForget()
Variant ofbuildClustered()
that ignores the result of the operation.This method subscribes on the result of
buildClustered()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombuildClustered()
but you don't need to compose it with other operations.
-
withMetrics
public VertxBuilder withMetrics(io.vertx.core.spi.VertxMetricsFactory factory)
- Parameters:
factory
- the metrics factory- Returns:
- a reference to this, so the API can be used fluently
-
withTracer
public VertxBuilder withTracer(io.vertx.core.spi.VertxTracerFactory factory)
- Parameters:
factory
- the tracer factory- Returns:
- a reference to this, so the API can be used fluently
-
withClusterManager
public VertxBuilder withClusterManager(io.vertx.core.spi.cluster.ClusterManager clusterManager)
- Parameters:
clusterManager
- the cluster manager- Returns:
- a reference to this, so the API can be used fluently
-
newInstance
public static VertxBuilder newInstance(io.vertx.core.VertxBuilder arg)
-
-