Package io.vertx.rxjava3.mssqlclient
Class MSSQLPool
- java.lang.Object
-
- io.vertx.rxjava3.sqlclient.SqlClient
-
- io.vertx.rxjava3.sqlclient.Pool
-
- io.vertx.rxjava3.mssqlclient.MSSQLPool
-
public class MSSQLPool extends Pool
A ofSQL Server connections. NOTE: This class has been automatically generated from theoriginalnon RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<MSSQLPool>__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MSSQLPoolconnectHandler(Handler<SqlConnection> handler)Set an handler called when the pool has established a connection to the database.MSSQLPoolconnectionProvider(Function<Context,io.reactivex.rxjava3.core.Single<SqlConnection>> provider)Replace the default pool connection provider, the newproviderreturns a future connection for a given .booleanequals(Object o)MSSQLPoolgetDelegate()inthashCode()static MSSQLPoolnewInstance(MSSQLPool arg)static MSSQLPoolpool(MSSQLConnectOptions database, PoolOptions options)Create a connection pool to the SQL serverdatabaseconfigured with the givenoptions.static MSSQLPoolpool(Vertx vertx, MSSQLConnectOptions database, PoolOptions options)Likepool(java.lang.String)with a specific instance.static MSSQLPoolpool(Vertx vertx, String connectionUri)Likepool(java.lang.String)with default options.static MSSQLPoolpool(Vertx vertx, String connectionUri, PoolOptions options)static MSSQLPoolpool(Vertx vertx, Supplier<Future<MSSQLConnectOptions>> databases, PoolOptions options)Likepool(java.lang.String)with a specific instance.static MSSQLPoolpool(Vertx vertx, List<MSSQLConnectOptions> databases, PoolOptions options)Likepool(java.lang.String)with a specific instance.static MSSQLPoolpool(String connectionUri)Likepool(java.lang.String)with default options.static MSSQLPoolpool(String connectionUri, PoolOptions options)static MSSQLPoolpool(Supplier<Future<MSSQLConnectOptions>> databases, PoolOptions options)Create a connection pool to the SQL Serverdatabases.static MSSQLPoolpool(List<MSSQLConnectOptions> databases, PoolOptions options)Create a connection pool to the SQL Serverdatabaseswith round-robin selection.StringtoString()-
Methods inherited from class io.vertx.rxjava3.sqlclient.Pool
close, getConnection, newInstance, pool, pool, pool, preparedQuery, query, rxClose, rxGetConnection, rxWithConnection, rxWithTransaction, rxWithTransaction, size, withConnection, withTransaction, withTransaction
-
Methods inherited from class io.vertx.rxjava3.sqlclient.SqlClient
newInstance, preparedQuery
-
-
-
-
Method Detail
-
getDelegate
public MSSQLPool getDelegate()
- Overrides:
getDelegatein classPool
-
pool
public static MSSQLPool pool(String connectionUri)
Likepool(java.lang.String)with default options.- Parameters:
connectionUri-- Returns:
-
pool
public static MSSQLPool pool(String connectionUri, PoolOptions options)
- Parameters:
connectionUri-options-- Returns:
-
pool
public static MSSQLPool pool(Vertx vertx, String connectionUri)
Likepool(java.lang.String)with default options.- Parameters:
vertx-connectionUri-- Returns:
-
pool
public static MSSQLPool pool(Vertx vertx, String connectionUri, PoolOptions options)
- Parameters:
vertx-connectionUri-options-- Returns:
-
pool
public static MSSQLPool pool(MSSQLConnectOptions database, PoolOptions options)
Create a connection pool to the SQL serverdatabaseconfigured with the givenoptions.- Parameters:
database- the options for the connectionoptions- the options for creating the pool- Returns:
- the connection pool
-
pool
public static MSSQLPool pool(Vertx vertx, MSSQLConnectOptions database, PoolOptions options)
Likepool(java.lang.String)with a specific instance.- Parameters:
vertx-database-options-- Returns:
-
pool
public static MSSQLPool pool(List<MSSQLConnectOptions> databases, PoolOptions options)
Create a connection pool to the SQL Serverdatabaseswith round-robin selection. Round-robin is applied when a new connection is created by the pool.- Parameters:
databases- the list of databasesoptions- the options for creating the pool- Returns:
- the connection pool
-
pool
public static MSSQLPool pool(Vertx vertx, List<MSSQLConnectOptions> databases, PoolOptions options)
Likepool(java.lang.String)with a specific instance.- Parameters:
vertx-databases-options-- Returns:
-
connectHandler
public MSSQLPool connectHandler(Handler<SqlConnection> handler)
Description copied from class:PoolSet an 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.- Overrides:
connectHandlerin classPool- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
connectionProvider
public MSSQLPool connectionProvider(Function<Context,io.reactivex.rxjava3.core.Single<SqlConnection>> provider)
Description copied from class:PoolReplace the default pool connection provider, the newproviderreturns a future connection for a given .A
ConnectionFactorycan be used as connection provider.- Overrides:
connectionProviderin classPool- Parameters:
provider- the new connection provider- Returns:
- a reference to this, so the API can be used fluently
-
pool
public static MSSQLPool pool(Supplier<Future<MSSQLConnectOptions>> databases, PoolOptions options)
Create a connection pool to the SQL Serverdatabases. The supplier is called to provide the options when a new connection is created by the pool.- Parameters:
databases- the databases supplieroptions- the options for creating the pool- Returns:
- the connection pool
-
pool
public static MSSQLPool pool(Vertx vertx, Supplier<Future<MSSQLConnectOptions>> databases, PoolOptions options)
Likepool(java.lang.String)with a specific instance.- Parameters:
vertx-databases-options-- Returns:
-
-