public class MySQLPool extends Pool
MySQL 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<MySQLPool> |
__TYPE_ARG |
Constructor and Description |
---|
MySQLPool(MySQLPool delegate) |
MySQLPool(Object delegate) |
Modifier and Type | Method and Description |
---|---|
MySQLPool |
connectHandler(Handler<SqlConnection> handler)
Set an handler called when the pool has established a connection to the database.
|
MySQLPool |
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) |
MySQLPool |
getDelegate() |
int |
hashCode() |
static MySQLPool |
newInstance(MySQLPool arg) |
static MySQLPool |
pool(List<MySQLConnectOptions> databases,
PoolOptions options)
Create a connection pool to the MySQL
databases with round-robin selection. |
static MySQLPool |
pool(MySQLConnectOptions database,
PoolOptions options)
Create a connection pool to the MySQL
server configured with the given options . |
static MySQLPool |
pool(String connectionUri)
Like
pool(java.lang.String) with default options. |
static MySQLPool |
pool(String connectionUri,
PoolOptions options)
|
static MySQLPool |
pool(Vertx vertx,
List<MySQLConnectOptions> databases,
PoolOptions options)
Like
pool(java.lang.String) with a specific instance. |
static MySQLPool |
pool(Vertx vertx,
MySQLConnectOptions database,
PoolOptions options)
Like
pool(java.lang.String) with a specific instance. |
static MySQLPool |
pool(Vertx vertx,
String connectionUri)
Like
pool(java.lang.String) with default options. |
static MySQLPool |
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, preparedQuery
public static final io.vertx.lang.rx.TypeArg<MySQLPool> __TYPE_ARG
public MySQLPool(MySQLPool delegate)
public MySQLPool(Object delegate)
public MySQLPool getDelegate()
getDelegate
in class Pool
public static MySQLPool pool(String connectionUri)
pool(java.lang.String)
with default options.connectionUri
- public static MySQLPool pool(String connectionUri, PoolOptions options)
connectionUri
- options
- public static MySQLPool pool(Vertx vertx, String connectionUri)
pool(java.lang.String)
with default options.vertx
- connectionUri
- public static MySQLPool pool(Vertx vertx, String connectionUri, PoolOptions options)
vertx
- connectionUri
- options
- public static MySQLPool pool(MySQLConnectOptions database, PoolOptions options)
server
configured with the given options
.database
- the options for the connectionoptions
- the options for creating the poolpublic static MySQLPool pool(Vertx vertx, MySQLConnectOptions database, PoolOptions options)
pool(java.lang.String)
with a specific instance.vertx
- database
- options
- public static MySQLPool pool(List<MySQLConnectOptions> 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 serversoptions
- the options for creating the poolpublic static MySQLPool pool(Vertx vertx, List<MySQLConnectOptions> databases, PoolOptions options)
pool(java.lang.String)
with a specific instance.vertx
- databases
- options
- public MySQLPool 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 MySQLPool 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 © 2022 Eclipse. All rights reserved.