Class ClientBuilder<C>
java.lang.Object
io.vertx.reactivex.sqlclient.ClientBuilder<C>
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.vertx.lang.rx.TypeArg<ClientBuilder> final io.vertx.lang.rx.TypeArg<C> -
Constructor Summary
ConstructorsConstructorDescriptionClientBuilder(ClientBuilder delegate) ClientBuilder(Object delegate, io.vertx.lang.rx.TypeArg<C> typeArg_0) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build and return the client.connectingTo(SqlConnectOptions database) Configure thedatabasethe client should connect to.connectingTo(String database) Configure thedatabasethe client should connect to.connectingTo(Supplier<Future<SqlConnectOptions>> supplier) Configure thedatabasethe client should connect to.connectingTo(List<SqlConnectOptions> databases) Configure thedatabasethe client should connect to.booleaninthashCode()static <C> ClientBuilder<C> newInstance(ClientBuilder arg) static <C> ClientBuilder<C> newInstance(ClientBuilder arg, io.vertx.lang.rx.TypeArg<C> __typeArg_C) toString()Sets the vertx instance to use.with(NetClientOptions options) Configure the client pool with the given transportoptions.with(PoolOptions options) Configure the client with the given pooloptionswithConnectHandler(Handler<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
-
ClientBuilder
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
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
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
SqlClient.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
-
newInstance
-
newInstance
public static <C> ClientBuilder<C> newInstance(ClientBuilder arg, io.vertx.lang.rx.TypeArg<C> __typeArg_C)
-