Package io.vertx.mutiny.core
Class VertxBuilder
java.lang.Object
io.vertx.mutiny.core.VertxBuilder
- All Implemented Interfaces:
MutinyDelegate
A builder for creating Vert.x instances, allowing to configure Vert.x plugins:
- metrics
- tracing
- cluster manager
Vertx vertx = Vertx.builder().with(options).withMetrics(metricsFactory).build();
NOTE: This class has been automatically generated from the original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVertxBuilder
(io.vertx.core.VertxBuilder delegate) VertxBuilder
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
io.smallrye.mutiny.Uni<Vertx>
Creates a clustered instance.Blocking variant ofbuildClustered()
.void
Variant ofbuildClustered()
that ignores the result of the operation.boolean
io.vertx.core.VertxBuilder
int
hashCode()
static VertxBuilder
newInstance
(io.vertx.core.VertxBuilder arg) toString()
with
(io.vertx.core.VertxOptions options) withClusterManager
(io.vertx.core.spi.cluster.ClusterManager clusterManager) withMetrics
(io.vertx.core.spi.VertxMetricsFactory factory) withTracer
(io.vertx.core.spi.VertxTracerFactory factory)
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
VertxBuilder
public VertxBuilder(io.vertx.core.VertxBuilder delegate) -
VertxBuilder
-
-
Method Details
-
getDelegate
public io.vertx.core.VertxBuilder getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
with
- Parameters:
options
- the Vert.x options- Returns:
- a reference to this, so the API can be used fluently
-
build
- Returns:
- the instance
-
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
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
- Parameters:
factory
- the metrics factory- Returns:
- a reference to this, so the API can be used fluently
-
withTracer
- Parameters:
factory
- the tracer factory- Returns:
- a reference to this, so the API can be used fluently
-
withClusterManager
- Parameters:
clusterManager
- the cluster manager- Returns:
- a reference to this, so the API can be used fluently
-
newInstance
-