Package io.vertx.mutiny.sqlclient
Class ClientBuilder<C>
java.lang.Object
io.vertx.mutiny.sqlclient.ClientBuilder<C>
- All Implemented Interfaces:
MutinyDelegate
Builder for
SqlClient instances.
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- See Also:
-
ClientBuilder
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClientBuilder(io.vertx.sqlclient.ClientBuilder<C> delegate) Create a new instance ofClientBuilderdelegating to the given (non-null) instance ofClientBuilder.ClientBuilder(io.vertx.sqlclient.ClientBuilder<C> delegate, TypeArg<C> typeArg_0) ClientBuilder(Object delegate, TypeArg<C> typeArg_0) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build and return the client.connectingTo(io.vertx.sqlclient.SqlConnectOptions database) Configure thedatabasethe client should connect to.connectingTo(String database) Configure thedatabasethe client should connect to.connectingTo(Supplier<io.smallrye.mutiny.Uni<io.vertx.sqlclient.SqlConnectOptions>> supplier) Configure thedatabasethe client should connect to.connectingTo(List<io.vertx.sqlclient.SqlConnectOptions> databases) Configure thedatabasethe client should connect to.booleanio.vertx.sqlclient.ClientBuilder<C>Get the delegate instance.inthashCode()static <C> ClientBuilder<C>newInstance(io.vertx.sqlclient.ClientBuilder<C> delegate) Creates a new instance of theClientBuilder.static <C> ClientBuilder<C>newInstance(io.vertx.sqlclient.ClientBuilder<C> delegate, TypeArg<C> typeArg_0) Creates a new instance of theClientBuilder.toString()Sets the vertx instance to use.with(io.vertx.core.net.NetClientOptions options) Configure the client pool with the given transportoptions.with(io.vertx.sqlclient.PoolOptions options) Configure the client with the given pooloptionswithConnectHandler(Consumer<SqlConnection> handler) Set a handler called when the pool has established a connection to the database.
-
Field Details
-
__TYPE_ARG
-
__typeArg_0
-
-
Constructor Details
-
ClientBuilder
Create a new instance ofClientBuilderdelegating to the given (non-null) instance ofClientBuilder. -
ClientBuilder
-
ClientBuilder
-
-
Method Details
-
getDelegate
Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
with
Configure the client with the given pooloptions- Parameters:
options- the pool options- Returns:
- a reference to this, so the API can be used fluently
-
with
Configure the client pool with the given transportoptions. Note: the SSL options part is ignored, sinceSqlConnectOptionsconfigures the transport SSL.- Parameters:
options- the transport options- Returns:
- a reference to this, so the API can be used fluently
-
connectingTo
Configure thedatabasethe client should connect to. The targetdatabaseis specified as aSqlConnectOptionscoordinates.- Parameters:
database- the database coordinates- Returns:
- a reference to this, so the API can be used fluently
-
connectingTo
Configure thedatabasethe client should connect to. The targetdatabaseis specified as aSqlConnectOptionscoordinates.- Parameters:
database- the database URI- Returns:
- a reference to this, so the API can be used fluently
-
connectingTo
public ClientBuilder<C> connectingTo(Supplier<io.smallrye.mutiny.Uni<io.vertx.sqlclient.SqlConnectOptions>> supplier) Configure thedatabasethe client should connect to. When the client needs to connect to the database, it gets fresh database configuration from the databasesupplier.- Parameters:
supplier- the supplier of database coordinates- Returns:
- a reference to this, so the API can be used fluently
-
connectingTo
Configure thedatabasethe client should connect to. When the client needs to connect to the database, it gets a database configuration from the list ofdatabasesusing a round-robin policy.- Parameters:
databases- the list of database coordinates- Returns:
- a reference to this, so the API can be used fluently
-
using
Sets the vertx instance to use.- Parameters:
vertx- the vertx instance- Returns:
- a reference to this, so the API can be used fluently
-
withConnectHandler
Set a handler called when the pool has established a connection to the database.This handler allows interactions with the database before the connection is added to the pool.
When the handler has finished, it must call
SqlConnection.close()to release the connection to the pool.- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
build
Build and return the client.- Returns:
- the client
-
newInstance
Creates a new instance of theClientBuilder. -
newInstance
public static <C> ClientBuilder<C> newInstance(io.vertx.sqlclient.ClientBuilder<C> delegate, TypeArg<C> typeArg_0) Creates a new instance of theClientBuilder. -
hashCode
public int hashCode() -
equals
-
toString
-