Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<DB2Pool> |
__TYPE_ARG |
Constructor and Description |
---|
DB2Pool(DB2Pool delegate) |
DB2Pool(Object delegate) |
Modifier and Type | Method and Description |
---|---|
static SqlClient |
client(DB2ConnectOptions database,
PoolOptions options)
Create a pooled client to the DB2
database configured with the given options . |
static SqlClient |
client(List<DB2ConnectOptions> databases,
PoolOptions options)
Create a client backed by a connection pool to the DB2
databases with round-robin selection. |
static SqlClient |
client(String connectionUri)
Like
client(java.lang.String) with default options. |
static SqlClient |
client(String connectionUri,
PoolOptions options)
|
static SqlClient |
client(Vertx vertx,
DB2ConnectOptions database,
PoolOptions options)
Like
client(java.lang.String) with a specific
instance. |
static SqlClient |
client(Vertx vertx,
List<DB2ConnectOptions> databases,
PoolOptions options)
Like
client(java.lang.String) with a specific
instance. |
static SqlClient |
client(Vertx vertx,
String connectionUri)
Like
client(java.lang.String) with default options. |
static SqlClient |
client(Vertx vertx,
String connectionUri,
PoolOptions options)
|
DB2Pool |
connectHandler(Handler<SqlConnection> handler)
Set an handler called when the pool has established a connection to the database.
|
DB2Pool |
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) |
DB2Pool |
getDelegate() |
int |
hashCode() |
static DB2Pool |
newInstance(DB2Pool arg) |
static DB2Pool |
pool(DB2ConnectOptions database,
PoolOptions options)
Create a connection pool to the DB2
database configured with the given options . |
static DB2Pool |
pool(List<DB2ConnectOptions> databases,
PoolOptions options)
Create a connection pool to the DB2
databases with round-robin selection. |
static DB2Pool |
pool(String connectionUri)
Like
pool(java.lang.String) with default options. |
static DB2Pool |
pool(String connectionUri,
PoolOptions options)
|
static DB2Pool |
pool(Vertx vertx,
DB2ConnectOptions database,
PoolOptions options)
Like
pool(java.lang.String) with a specific
instance. |
static DB2Pool |
pool(Vertx vertx,
List<DB2ConnectOptions> databases,
PoolOptions options)
Like
pool(java.lang.String) with a specific
instance. |
static DB2Pool |
pool(Vertx vertx,
String connectionUri)
Like
pool(java.lang.String) with default options. |
static DB2Pool |
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<DB2Pool> __TYPE_ARG
public DB2Pool getDelegate()
getDelegate
in class Pool
public static DB2Pool pool(String connectionUri)
pool(java.lang.String)
with default options.connectionUri
- public static DB2Pool pool(String connectionUri, PoolOptions options)
connectionUri
- options
- public static DB2Pool pool(Vertx vertx, String connectionUri)
pool(java.lang.String)
with default options.vertx
- connectionUri
- public static DB2Pool pool(Vertx vertx, String connectionUri, PoolOptions options)
vertx
- connectionUri
- options
- public static DB2Pool pool(DB2ConnectOptions database, PoolOptions options)
database
configured with the given options
.database
- the options for the connectionoptions
- the options for creating the poolpublic static DB2Pool pool(Vertx vertx, DB2ConnectOptions database, PoolOptions options)
pool(java.lang.String)
with a specific
instance.vertx
- database
- options
- public static DB2Pool pool(List<DB2ConnectOptions> 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 DB2Pool pool(Vertx vertx, List<DB2ConnectOptions> 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 default options.connectionUri
- public static SqlClient client(String connectionUri, PoolOptions options)
connectionUri
- options
- public static SqlClient client(Vertx vertx, String connectionUri)
client(java.lang.String)
with default options.vertx
- connectionUri
- public static SqlClient client(Vertx vertx, String connectionUri, PoolOptions options)
vertx
- connectionUri
- options
- public static SqlClient client(DB2ConnectOptions database, PoolOptions options)
database
configured with the given options
.database
- the options for the connectionoptions
- the options for creating the poolpublic static SqlClient client(Vertx vertx, DB2ConnectOptions database, PoolOptions options)
client(java.lang.String)
with a specific
instance.vertx
- database
- options
- public static SqlClient client(List<DB2ConnectOptions> 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 SqlClient client(Vertx vertx, List<DB2ConnectOptions> databases, PoolOptions options)
client(java.lang.String)
with a specific
instance.vertx
- databases
- options
- public DB2Pool 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 DB2Pool 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.