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 TypeArg<MySQLPool> |
__TYPE_ARG |
Constructor and Description |
---|
MySQLPool(io.vertx.mysqlclient.MySQLPool delegate) |
MySQLPool(Object delegate) |
Modifier and Type | Method and Description |
---|---|
MySQLPool |
connectHandler(io.vertx.core.Handler<SqlConnection> handler)
Set an handler called when the pool has established a connection to the database.
|
MySQLPool |
connectionProvider(Function<Context,io.vertx.core.Future<SqlConnection>> provider)
Replace the default pool connection provider, the new
provider returns a future connection for a
given . |
boolean |
equals(Object o) |
io.vertx.mysqlclient.MySQLPool |
getDelegate() |
int |
hashCode() |
static MySQLPool |
newInstance(io.vertx.mysqlclient.MySQLPool arg) |
static MySQLPool |
pool(List<io.vertx.mysqlclient.MySQLConnectOptions> databases,
io.vertx.sqlclient.PoolOptions options)
Create a connection pool to the MySQL
databases with round-robin selection. |
static MySQLPool |
pool(io.vertx.mysqlclient.MySQLConnectOptions database,
io.vertx.sqlclient.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,
io.vertx.sqlclient.PoolOptions options)
|
static MySQLPool |
pool(Vertx vertx,
List<io.vertx.mysqlclient.MySQLConnectOptions> databases,
io.vertx.sqlclient.PoolOptions options)
Like
pool(java.lang.String) with a specific instance. |
static MySQLPool |
pool(Vertx vertx,
io.vertx.mysqlclient.MySQLConnectOptions database,
io.vertx.sqlclient.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,
io.vertx.sqlclient.PoolOptions options)
|
String |
toString() |
close, close, getConnection, getConnection, newInstance, pool, pool, pool, preparedQuery, query, rxClose, rxGetConnection, rxWithConnection, rxWithTransaction, size, withConnection, withConnection, withTransaction, withTransaction
newInstance, preparedQuery
public MySQLPool(io.vertx.mysqlclient.MySQLPool delegate)
public MySQLPool(Object delegate)
public io.vertx.mysqlclient.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, io.vertx.sqlclient.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, io.vertx.sqlclient.PoolOptions options)
vertx
- connectionUri
- options
- public static MySQLPool pool(io.vertx.mysqlclient.MySQLConnectOptions database, io.vertx.sqlclient.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, io.vertx.mysqlclient.MySQLConnectOptions database, io.vertx.sqlclient.PoolOptions options)
pool(java.lang.String)
with a specific instance.vertx
- database
- options
- public static MySQLPool pool(List<io.vertx.mysqlclient.MySQLConnectOptions> databases, io.vertx.sqlclient.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<io.vertx.mysqlclient.MySQLConnectOptions> databases, io.vertx.sqlclient.PoolOptions options)
pool(java.lang.String)
with a specific instance.vertx
- databases
- options
- public MySQLPool connectHandler(io.vertx.core.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(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
to release the connection
to the pool.
connectHandler
in class Pool
handler
- the handlerpublic MySQLPool connectionProvider(Function<Context,io.vertx.core.Future<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 providerpublic static MySQLPool newInstance(io.vertx.mysqlclient.MySQLPool arg)
Copyright © 2021 Eclipse. All rights reserved.