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 |
---|---|
static SqlClient |
client(List<MySQLConnectOptions> databases,
PoolOptions options)
Create a client backed by a connection pool to the MySQL
databases with round-robin selection. |
static SqlClient |
client(MySQLConnectOptions connectOptions,
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,
PoolOptions poolOptions)
|
static SqlClient |
client(java.util.function.Supplier<Future<MySQLConnectOptions>> databases,
PoolOptions options)
Create a client backed by a connection pool to the MySQL
databases . |
static SqlClient |
client(Vertx vertx,
List<MySQLConnectOptions> mySQLConnectOptions,
PoolOptions options)
Like
client(java.lang.String) with a specific instance. |
static SqlClient |
client(Vertx vertx,
MySQLConnectOptions connectOptions,
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,
PoolOptions poolOptions)
|
static SqlClient |
client(Vertx vertx,
java.util.function.Supplier<Future<MySQLConnectOptions>> mySQLConnectOptions,
PoolOptions options)
Like
client(java.lang.String) with a specific instance. |
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,Future<SqlConnection>> provider)
Replace the default pool connection provider, the new
provider returns a future connection for a
given . |
MySQLPool |
connectionProvider(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(java.util.function.Supplier<Future<MySQLConnectOptions>> databases,
PoolOptions options)
Create a connection pool to the MySQL
databases . |
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)
|
static MySQLPool |
pool(Vertx vertx,
java.util.function.Supplier<Future<MySQLConnectOptions>> databases,
PoolOptions options)
Like
pool(java.lang.String) with a specific instance. |
String |
toString() |
close, close, getConnection, getConnection, newInstance, pool, pool, pool, preparedQuery, query, rxClose, rxGetConnection, rxWithConnection, rxWithConnection, rxWithTransaction, rxWithTransaction, rxWithTransaction, rxWithTransaction, size, withConnection, withConnection, withConnection, withConnection, withTransaction, withTransaction, withTransaction, withTransaction, withTransaction, withTransaction, withTransaction, 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 static SqlClient client(String connectionUri)
client(java.lang.String)
with a default poolOptions
.connectionUri
- public static SqlClient client(String connectionUri, 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, PoolOptions poolOptions)
vertx
- connectionUri
- poolOptions
- public static SqlClient client(MySQLConnectOptions connectOptions, PoolOptions poolOptions)
connectOptions
and poolOptions
.connectOptions
- poolOptions
- the options for creating the backing poolpublic static SqlClient client(Vertx vertx, MySQLConnectOptions connectOptions, PoolOptions poolOptions)
client(java.lang.String)
with a specific instance.vertx
- connectOptions
- poolOptions
- public static SqlClient client(Vertx vertx, List<MySQLConnectOptions> mySQLConnectOptions, PoolOptions options)
client(java.lang.String)
with a specific instance.vertx
- mySQLConnectOptions
- options
- public static SqlClient client(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 databasesoptions
- the options for creating the poolpublic 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(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(java.util.function.Function<Context,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 MySQLPool connectionProvider(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 providerpublic static MySQLPool pool(java.util.function.Supplier<Future<MySQLConnectOptions>> databases, PoolOptions options)
databases
. The supplier is called
to provide the options when a new connection is created by the pool.databases
- the server supplieroptions
- the options for creating the poolpublic static MySQLPool pool(Vertx vertx, java.util.function.Supplier<Future<MySQLConnectOptions>> databases, PoolOptions options)
pool(java.lang.String)
with a specific instance.vertx
- databases
- options
- public static SqlClient client(Vertx vertx, java.util.function.Supplier<Future<MySQLConnectOptions>> mySQLConnectOptions, PoolOptions options)
client(java.lang.String)
with a specific instance.vertx
- mySQLConnectOptions
- options
- public static SqlClient client(java.util.function.Supplier<Future<MySQLConnectOptions>> databases, PoolOptions options)
databases
. The supplier is called
to provide the options when a new connection is created by the pool.databases
- the databases supplieroptions
- the options for creating the poolCopyright © 2024 Eclipse. All rights reserved.