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(io.vertx.mysqlclient.MySQLPool delegate) |
MySQLPool(Object delegate) |
Modifier and Type | Method and Description |
---|---|
static SqlClient |
client(List<io.vertx.mysqlclient.MySQLConnectOptions> databases,
io.vertx.sqlclient.PoolOptions options)
Create a client backed by a connection pool to the MySQL
databases with round-robin selection. |
static SqlClient |
client(io.vertx.mysqlclient.MySQLConnectOptions connectOptions,
io.vertx.sqlclient.PoolOptions poolOptions)
Create a client backed by a connection pool to the database configured with the given
connectOptions and poolOptions . |
static SqlClient |
client(String connectionUri)
Like
client(java.lang.String) with a default poolOptions . |
static SqlClient |
client(String connectionUri,
io.vertx.sqlclient.PoolOptions poolOptions)
|
static SqlClient |
client(Vertx vertx,
List<io.vertx.mysqlclient.MySQLConnectOptions> mySQLConnectOptions,
io.vertx.sqlclient.PoolOptions options)
Like
client(java.lang.String) with a specific instance. |
static SqlClient |
client(Vertx vertx,
io.vertx.mysqlclient.MySQLConnectOptions connectOptions,
io.vertx.sqlclient.PoolOptions poolOptions)
Like
client(java.lang.String) with a specific instance. |
static SqlClient |
client(Vertx vertx,
String connectionUri)
Like
client(java.lang.String) with a default poolOptions . |
static SqlClient |
client(Vertx vertx,
String connectionUri,
io.vertx.sqlclient.PoolOptions poolOptions)
|
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 static final io.vertx.lang.rx.TypeArg<MySQLPool> __TYPE_ARG
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 static SqlClient client(String connectionUri)
client(java.lang.String)
with a default poolOptions
.connectionUri
- public static SqlClient client(String connectionUri, io.vertx.sqlclient.PoolOptions poolOptions)
connectionUri
- poolOptions
- public static SqlClient client(Vertx vertx, String connectionUri)
client(java.lang.String)
with a default poolOptions
.vertx
- connectionUri
- public static SqlClient client(Vertx vertx, String connectionUri, io.vertx.sqlclient.PoolOptions poolOptions)
vertx
- connectionUri
- poolOptions
- public static SqlClient client(io.vertx.mysqlclient.MySQLConnectOptions connectOptions, io.vertx.sqlclient.PoolOptions poolOptions)
connectOptions
and poolOptions
.connectOptions
- poolOptions
- the options for creating the backing poolpublic static SqlClient client(Vertx vertx, io.vertx.mysqlclient.MySQLConnectOptions connectOptions, io.vertx.sqlclient.PoolOptions poolOptions)
client(java.lang.String)
with a specific instance.vertx
- connectOptions
- poolOptions
- public static SqlClient client(Vertx vertx, List<io.vertx.mysqlclient.MySQLConnectOptions> mySQLConnectOptions, io.vertx.sqlclient.PoolOptions options)
client(java.lang.String)
with a specific instance.vertx
- mySQLConnectOptions
- options
- public static SqlClient client(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 databasesoptions
- the options for creating the poolpublic 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 © 2022 Eclipse. All rights reserved.