@Deprecated public interface PgPool extends Pool
pool
of PostgreSQL connections
.Modifier and Type | Method and Description |
---|---|
static SqlClient |
client()
Deprecated.
Like
client(PoolOptions) with default options. |
static SqlClient |
client(List<PgConnectOptions> databases,
PoolOptions options)
Deprecated.
Create a client backed by a connection pool to the PostgreSQL
databases with round-robin selection. |
static SqlClient |
client(PgConnectOptions database,
PoolOptions options)
Deprecated.
Create a client backed by a connection pool to the PostgreSQL
database configured with the given options . |
static SqlClient |
client(PoolOptions options)
Deprecated.
Like
client(PgConnectOptions, PoolOptions) with database retrieved from the environment variables. |
static SqlClient |
client(String connectionUri)
Deprecated.
Like
pool(String, PoolOptions) with default options. |
static SqlClient |
client(String connectionUri,
PoolOptions options)
Deprecated.
|
static SqlClient |
client(java.util.function.Supplier<Future<PgConnectOptions>> databases,
PoolOptions options)
Deprecated.
Create a client backed by a connection pool to the PostgreSQL
databases . |
static SqlClient |
client(Vertx vertx,
List<PgConnectOptions> databases,
PoolOptions options)
Deprecated.
Like
client(List, PoolOptions) with a specific Vertx instance. |
static SqlClient |
client(Vertx vertx,
PgConnectOptions database,
PoolOptions options)
Deprecated.
Like
client(PgConnectOptions, PoolOptions) with a specific Vertx instance. |
static SqlClient |
client(Vertx vertx,
PoolOptions poolOptions)
Deprecated.
Like
client(Vertx, PgConnectOptions, PoolOptions) with database retrieved from the environment variables. |
static SqlClient |
client(Vertx vertx,
String connectionUri)
Deprecated.
Like
client(Vertx, String,PoolOptions) with default options. |
static SqlClient |
client(Vertx vertx,
String connectionUri,
PoolOptions options)
Deprecated.
|
static SqlClient |
client(Vertx vertx,
java.util.function.Supplier<Future<PgConnectOptions>> databases,
PoolOptions options)
Deprecated.
Like
client(Supplier, PoolOptions) with a specific Vertx instance. |
PgPool |
connectHandler(Handler<SqlConnection> handler)
Deprecated.
Set an handler called when the pool has established a connection to the database.
|
PgPool |
connectionProvider(java.util.function.Function<Context,Future<SqlConnection>> provider)
Deprecated.
Replace the default pool connection provider, the new
provider returns a future connection for a
given Context . |
static PgPool |
pool()
Deprecated.
Like
pool(PoolOptions) with a default poolOptions . |
static PgPool |
pool(List<PgConnectOptions> databases,
PoolOptions poolOptions)
Deprecated.
Create a connection pool to the PostgreSQL
databases with round-robin selection. |
static PgPool |
pool(PgConnectOptions database,
PoolOptions options)
Deprecated.
Create a connection pool to the PostgreSQL
database configured with the given options . |
static PgPool |
pool(PoolOptions options)
Deprecated.
Like
pool(PgConnectOptions, PoolOptions) with connectOptions build from the environment variables. |
static PgPool |
pool(String connectionUri)
Deprecated.
Like
pool(String, PoolOptions) with a default poolOptions . |
static PgPool |
pool(String connectionUri,
PoolOptions options)
Deprecated.
|
static PgPool |
pool(java.util.function.Supplier<Future<PgConnectOptions>> databases,
PoolOptions poolOptions)
Deprecated.
Create a connection pool to the PostgreSQL
databases . |
static PgPool |
pool(Vertx vertx,
List<PgConnectOptions> databases,
PoolOptions poolOptions)
Deprecated.
Like
pool(List, PoolOptions) with a specific Vertx instance. |
static PgPool |
pool(Vertx vertx,
PgConnectOptions database,
PoolOptions options)
Deprecated.
Like
pool(PgConnectOptions, PoolOptions) with a specific Vertx instance. |
static PgPool |
pool(Vertx vertx,
PoolOptions options)
Deprecated.
Like
pool(Vertx, PgConnectOptions, PoolOptions) with the database retrieved from the environment variables. |
static PgPool |
pool(Vertx vertx,
String connectionUri)
Deprecated.
Like
pool(Vertx, String,PoolOptions) with default options. |
static PgPool |
pool(Vertx vertx,
String connectionUri,
PoolOptions poolOptions)
Deprecated.
Like
pool(Vertx, PgConnectOptions, PoolOptions) with database retrieved from the given connectionUri . |
static PgPool |
pool(Vertx vertx,
java.util.function.Supplier<Future<PgConnectOptions>> databases,
PoolOptions poolOptions)
Deprecated.
Like
pool(Supplier, PoolOptions) with a specific Vertx instance. |
close, getConnection, getConnection, pool, pool, pool, preparedQuery, query, size, withConnection, withConnection, withTransaction, withTransaction, withTransaction, withTransaction
close, preparedQuery
static PgPool pool()
pool(PoolOptions)
with a default poolOptions
.static PgPool pool(PoolOptions options)
pool(PgConnectOptions, PoolOptions)
with connectOptions
build from the environment variables.static PgPool pool(String connectionUri)
pool(String, PoolOptions)
with a default poolOptions
.static PgPool pool(String connectionUri, PoolOptions options)
static PgPool pool(Vertx vertx, String connectionUri)
pool(Vertx, String,PoolOptions)
with default options.static PgPool pool(Vertx vertx, PoolOptions options)
pool(Vertx, PgConnectOptions, PoolOptions)
with the database
retrieved from the environment variables.static PgPool pool(Vertx vertx, String connectionUri, PoolOptions poolOptions)
pool(Vertx, PgConnectOptions, PoolOptions)
with database
retrieved from the given connectionUri
.static PgPool pool(PgConnectOptions database, PoolOptions options)
database
configured with the given options
.database
- the databaseoptions
- the options for creating the poolstatic PgPool pool(Vertx vertx, PgConnectOptions database, PoolOptions options)
pool(PgConnectOptions, PoolOptions)
with a specific Vertx
instance.static PgPool pool(List<PgConnectOptions> databases, PoolOptions poolOptions)
databases
with round-robin selection.
Round-robin is applied when a new connection is created by the pool.databases
- the list of databasespoolOptions
- the options for creating the poolstatic PgPool pool(Vertx vertx, List<PgConnectOptions> databases, PoolOptions poolOptions)
pool(List, PoolOptions)
with a specific Vertx
instance.static PgPool pool(java.util.function.Supplier<Future<PgConnectOptions>> databases, PoolOptions poolOptions)
databases
. The supplier is called
to provide the options when a new connection is created by the pool.databases
- the databases supplierpoolOptions
- the options for creating the poolstatic PgPool pool(Vertx vertx, java.util.function.Supplier<Future<PgConnectOptions>> databases, PoolOptions poolOptions)
pool(Supplier, PoolOptions)
with a specific Vertx
instance.static SqlClient client()
client(PoolOptions)
with default options.static SqlClient client(PoolOptions options)
client(PgConnectOptions, PoolOptions)
with database
retrieved from the environment variables.static SqlClient client(String connectionUri)
pool(String, PoolOptions)
with default options.static SqlClient client(String connectionUri, PoolOptions options)
static SqlClient client(Vertx vertx, String connectionUri)
client(Vertx, String,PoolOptions)
with default options.static SqlClient client(Vertx vertx, PoolOptions poolOptions)
client(Vertx, PgConnectOptions, PoolOptions)
with database
retrieved from the environment variables.static SqlClient client(Vertx vertx, String connectionUri, PoolOptions options)
static SqlClient client(PgConnectOptions database, PoolOptions options)
database
configured with the given options
.options
- the options for creating the backing poolstatic SqlClient client(Vertx vertx, PgConnectOptions database, PoolOptions options)
client(PgConnectOptions, PoolOptions)
with a specific Vertx
instance.static SqlClient client(Vertx vertx, List<PgConnectOptions> databases, PoolOptions options)
client(List, PoolOptions)
with a specific Vertx
instance.static SqlClient client(List<PgConnectOptions> 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 poolstatic SqlClient client(Vertx vertx, java.util.function.Supplier<Future<PgConnectOptions>> databases, PoolOptions options)
client(Supplier, PoolOptions)
with a specific Vertx
instance.static SqlClient client(java.util.function.Supplier<Future<PgConnectOptions>> 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 poolPgPool 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 interface Pool
handler
- the handlerPgPool connectionProvider(java.util.function.Function<Context,Future<SqlConnection>> provider)
Pool
provider
returns a future connection for a
given Context
.
A ConnectionFactory
can be used as connection provider.
connectionProvider
in interface Pool
provider
- the new connection providerCopyright © 2024 Eclipse. All rights reserved.