public class MSSQLPool extends Pool
SQL Server connections
.
NOTE: This class has been automatically generated from the original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<MSSQLPool> |
__TYPE_ARG |
Constructor and Description |
---|
MSSQLPool(MSSQLPool delegate) |
MSSQLPool(Object delegate) |
Modifier and Type | Method and Description |
---|---|
MSSQLPool |
connectHandler(Handler<SqlConnection> handler)
Set an handler called when the pool has established a connection to the database.
|
MSSQLPool |
connectionProvider(java.util.function.Function<Context,Single<SqlConnection>> provider)
Replace the default pool connection provider, the new
provider returns a future connection for a
given . |
boolean |
equals(Object o) |
MSSQLPool |
getDelegate() |
int |
hashCode() |
static MSSQLPool |
newInstance(MSSQLPool arg) |
static MSSQLPool |
pool(List<MSSQLConnectOptions> databases,
PoolOptions options)
Create a connection pool to the SQL Server
databases with round-robin selection. |
static MSSQLPool |
pool(MSSQLConnectOptions database,
PoolOptions options)
Create a connection pool to the SQL server
database configured with the given options . |
static MSSQLPool |
pool(String connectionUri)
Like
pool(java.lang.String) with default options. |
static MSSQLPool |
pool(String connectionUri,
PoolOptions options)
|
static MSSQLPool |
pool(Vertx vertx,
List<MSSQLConnectOptions> databases,
PoolOptions options)
Like
pool(java.lang.String) with a specific instance. |
static MSSQLPool |
pool(Vertx vertx,
MSSQLConnectOptions database,
PoolOptions options)
Like
pool(java.lang.String) with a specific instance. |
static MSSQLPool |
pool(Vertx vertx,
String connectionUri)
Like
pool(java.lang.String) with default options. |
static MSSQLPool |
pool(Vertx vertx,
String connectionUri,
PoolOptions options)
|
String |
toString() |
close, getConnection, newInstance, pool, pool, pool, preparedQuery, query, rxClose, rxGetConnection, rxWithConnection, rxWithTransaction, size, withConnection, withTransaction
newInstance
public static final io.vertx.lang.rx.TypeArg<MSSQLPool> __TYPE_ARG
public MSSQLPool(MSSQLPool delegate)
public MSSQLPool(Object delegate)
public MSSQLPool getDelegate()
getDelegate
in class Pool
public static MSSQLPool pool(String connectionUri)
pool(java.lang.String)
with default options.connectionUri
- public static MSSQLPool pool(String connectionUri, PoolOptions options)
connectionUri
- options
- public static MSSQLPool pool(Vertx vertx, String connectionUri)
pool(java.lang.String)
with default options.vertx
- connectionUri
- public static MSSQLPool pool(Vertx vertx, String connectionUri, PoolOptions options)
vertx
- connectionUri
- options
- public static MSSQLPool pool(MSSQLConnectOptions database, PoolOptions options)
database
configured with the given options
.database
- the options for the connectionoptions
- the options for creating the poolpublic static MSSQLPool pool(Vertx vertx, MSSQLConnectOptions database, PoolOptions options)
pool(java.lang.String)
with a specific instance.vertx
- database
- options
- public static MSSQLPool pool(List<MSSQLConnectOptions> databases, PoolOptions options)
databases
with round-robin selection.
Round-robin is applied when a new connection is created by the pool.databases
- the list of databasesoptions
- the options for creating the poolpublic static MSSQLPool pool(Vertx vertx, List<MSSQLConnectOptions> databases, PoolOptions options)
pool(java.lang.String)
with a specific instance.vertx
- databases
- options
- public MSSQLPool connectHandler(Handler<SqlConnection> handler)
Pool
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.
connectHandler
in class Pool
handler
- the handlerpublic MSSQLPool connectionProvider(java.util.function.Function<Context,Single<SqlConnection>> provider)
Pool
provider
returns a future connection for a
given .
A ConnectionFactory
can be used as connection provider.
connectionProvider
in class Pool
provider
- the new connection providerCopyright © 2021 Eclipse. All rights reserved.