io.vertx.mysqlclient

## Interface MySQLPool

- All Superinterfaces:
    Pool, SqlClient

  Deprecated.

      @Deprecated
      public interface MySQLPool
      extends Pool

  A `pool` of `MySQL Connections`.

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SqlClient` | `client(List<MySQLConnectOptions> databases, PoolOptions options)` Deprecated. Create a client backed by a connection pool to the MySQL `databases` with round-robin selection.
    `static SqlClient` | `client(MySQLConnectOptions connectOptions, PoolOptions poolOptions)` Deprecated. Create a client backed by a connection pool to the database configured with the given `connectOptions` and `poolOptions`.
    `static SqlClient` | `client(String connectionUri)` Deprecated. Like `client(String, PoolOptions)` with a default `poolOptions`.
    `static SqlClient` | `client(String connectionUri, PoolOptions poolOptions)` Deprecated. Like `client(MySQLConnectOptions, PoolOptions)` with `connectOptions` build from `connectionUri`.
    `static SqlClient` | `client(java.util.function.Supplier<Future<MySQLConnectOptions>> databases, PoolOptions options)` Deprecated. Create a client backed by a connection pool to the MySQL `databases`.
    `static SqlClient` | `client(Vertx vertx, List<MySQLConnectOptions> mySQLConnectOptions, PoolOptions options)` Deprecated. Like `client(List, PoolOptions)` with a specific `Vertx` instance.
    `static SqlClient` | `client(Vertx vertx, MySQLConnectOptions connectOptions, PoolOptions poolOptions)` Deprecated. Like `client(MySQLConnectOptions, PoolOptions)` with a specific `Vertx` instance.
    `static SqlClient` | `client(Vertx vertx, String connectionUri)` Deprecated. Like `client(Vertx, String,PoolOptions)` with a default `poolOptions`.
    `static SqlClient` | `client(Vertx vertx, String connectionUri, PoolOptions poolOptions)` Deprecated. Like `client(Vertx, MySQLConnectOptions, PoolOptions)` with `connectOptions` build from `connectionUri`.
    `static SqlClient` | `client(Vertx vertx, java.util.function.Supplier<Future<MySQLConnectOptions>> mySQLConnectOptions, PoolOptions options)` Deprecated. Like `client(Supplier, PoolOptions)` with a specific `Vertx` instance.
    `MySQLPool` | `connectHandler(Handler<SqlConnection> handler)` Deprecated. Set an handler called when the pool has established a connection to the database.
    `MySQLPool` | `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 MySQLPool` | `pool(List<MySQLConnectOptions> databases, PoolOptions options)` Deprecated. Create a connection pool to the MySQL `databases` with round-robin selection.
    `static MySQLPool` | `pool(MySQLConnectOptions database, PoolOptions options)` Deprecated. Create a connection pool to the MySQL `server` configured with the given `options`.
    `static MySQLPool` | `pool(String connectionUri)` Deprecated. Like `pool(String, PoolOptions)` with default options.
    `static MySQLPool` | `pool(String connectionUri, PoolOptions options)` Deprecated. Like `pool(MySQLConnectOptions, PoolOptions)` with `database` built from `connectionUri`.
    `static MySQLPool` | `pool(java.util.function.Supplier<Future<MySQLConnectOptions>> databases, PoolOptions options)` Deprecated. Create a connection pool to the MySQL `databases`.
    `static MySQLPool` | `pool(Vertx vertx, List<MySQLConnectOptions> databases, PoolOptions options)` Deprecated. Like `pool(List, PoolOptions)` with a specific `Vertx` instance.
    `static MySQLPool` | `pool(Vertx vertx, MySQLConnectOptions database, PoolOptions options)` Deprecated. Like `pool(MySQLConnectOptions, PoolOptions)` with a specific `Vertx` instance.
    `static MySQLPool` | `pool(Vertx vertx, String connectionUri)` Deprecated. Like `pool(Vertx, String, PoolOptions)` with default options.
    `static MySQLPool` | `pool(Vertx vertx, String connectionUri, PoolOptions options)` Deprecated. Like `pool(Vertx, MySQLConnectOptions, PoolOptions)` with `database` built from `connectionUri`.
    `static MySQLPool` | `pool(Vertx vertx, java.util.function.Supplier<Future<MySQLConnectOptions>> databases, PoolOptions options)` Deprecated. Like `pool(Supplier, PoolOptions)` with a specific `Vertx` instance.

    - ### Methods inherited from interface io.vertx.sqlclient.Pool

      `close, getConnection, getConnection, pool, pool, pool, preparedQuery, query, size, withConnection, withConnection, withTransaction, withTransaction, withTransaction, withTransaction`

    - ### Methods inherited from interface io.vertx.sqlclient.SqlClient

      `close, preparedQuery`

- - ### Method Detail

    - #### pool

          static MySQLPool pool(String connectionUri)

      Deprecated.
      Like `pool(String, PoolOptions)` with default options.

    - #### pool

          static MySQLPool pool(String connectionUri,
                                PoolOptions options)

      Deprecated.
      Like `pool(MySQLConnectOptions, PoolOptions)` with `database` built from `connectionUri`.

    - #### pool

          static MySQLPool pool(Vertx vertx,
                                String connectionUri)

      Deprecated.
      Like `pool(Vertx, String, PoolOptions)` with default options.

    - #### pool

          static MySQLPool pool(Vertx vertx,
                                String connectionUri,
                                PoolOptions options)

      Deprecated.
      Like `pool(Vertx, MySQLConnectOptions, PoolOptions)` with `database` built from `connectionUri`.

    - #### pool

          static MySQLPool pool(MySQLConnectOptions database,
                                PoolOptions options)

      Deprecated.
      Create a connection pool to the MySQL `server` configured with the given `options`.
      Parameters:
        `database` - the options for the connection
        `options` - the options for creating the pool
      Returns:
        the connection pool

    - #### pool

          static MySQLPool pool(Vertx vertx,
                                MySQLConnectOptions database,
                                PoolOptions options)

      Deprecated.
      Like `pool(MySQLConnectOptions, PoolOptions)` with a specific `Vertx` instance.

    - #### pool

          static MySQLPool pool(List<MySQLConnectOptions> databases,
                                PoolOptions options)

      Deprecated.
      Create a connection pool to the MySQL `databases` with round-robin selection. Round-robin is applied when a new connection is created by the pool.
      Parameters:
        `databases` - the list of servers
        `options` - the options for creating the pool
      Returns:
        the connection pool

    - #### pool

          static MySQLPool pool(Vertx vertx,
                                List<MySQLConnectOptions> databases,
                                PoolOptions options)

      Deprecated.
      Like `pool(List, PoolOptions)` with a specific `Vertx` instance.

    - #### pool

          static MySQLPool pool(java.util.function.Supplier<Future<MySQLConnectOptions>> databases,
                                PoolOptions options)

      Deprecated.
      Create a connection pool to the MySQL `databases`. The supplier is called to provide the options when a new connection is created by the pool.
      Parameters:
        `databases` - the server supplier
        `options` - the options for creating the pool
      Returns:
        the connection pool

    - #### pool

          static MySQLPool pool(Vertx vertx,
                                java.util.function.Supplier<Future<MySQLConnectOptions>> databases,
                                PoolOptions options)

      Deprecated.
      Like `pool(Supplier, PoolOptions)` with a specific `Vertx` instance.

    - #### client

          static SqlClient client(String connectionUri)

      Deprecated.
      Like `client(String, PoolOptions)` with a default `poolOptions`.

    - #### client

          static SqlClient client(String connectionUri,
                                  PoolOptions poolOptions)

      Deprecated.
      Like `client(MySQLConnectOptions, PoolOptions)` with `connectOptions` build from `connectionUri`.

    - #### client

          static SqlClient client(Vertx vertx,
                                  String connectionUri)

      Deprecated.
      Like `client(Vertx, String,PoolOptions)` with a default `poolOptions`.

    - #### client

          static SqlClient client(Vertx vertx,
                                  String connectionUri,
                                  PoolOptions poolOptions)

      Deprecated.
      Like `client(Vertx, MySQLConnectOptions, PoolOptions)` with `connectOptions` build from `connectionUri`.

    - #### client

          static SqlClient client(MySQLConnectOptions connectOptions,
                                  PoolOptions poolOptions)

      Deprecated.
      Create a client backed by a connection pool to the database configured with the given `connectOptions` and `poolOptions`.
      Parameters:
        `poolOptions` - the options for creating the backing pool
      Returns:
        the client

    - #### client

          static SqlClient client(Vertx vertx,
                                  MySQLConnectOptions connectOptions,
                                  PoolOptions poolOptions)

      Deprecated.
      Like `client(MySQLConnectOptions, PoolOptions)` with a specific `Vertx` instance.

    - #### client

          static SqlClient client(Vertx vertx,
                                  List<MySQLConnectOptions> mySQLConnectOptions,
                                  PoolOptions options)

      Deprecated.
      Like `client(List, PoolOptions)` with a specific `Vertx` instance.

    - #### client

          static SqlClient client(List<MySQLConnectOptions> databases,
                                  PoolOptions options)

      Deprecated.
      Create a client backed by a connection pool to the MySQL `databases` with round-robin selection. Round-robin is applied when a new connection is created by the pool.
      Parameters:
        `databases` - the list of databases
        `options` - the options for creating the pool
      Returns:
        the pooled client

    - #### client

          static SqlClient client(Vertx vertx,
                                  java.util.function.Supplier<Future<MySQLConnectOptions>> mySQLConnectOptions,
                                  PoolOptions options)

      Deprecated.
      Like `client(Supplier, PoolOptions)` with a specific `Vertx` instance.

    - #### client

          static SqlClient client(java.util.function.Supplier<Future<MySQLConnectOptions>> databases,
                                  PoolOptions options)

      Deprecated.
      Create a client backed by a connection pool to the MySQL `databases`. The supplier is called to provide the options when a new connection is created by the pool.
      Parameters:
        `databases` - the databases supplier
        `options` - the options for creating the pool
      Returns:
        the pooled client

    - #### connectHandler

          MySQLPool connectHandler(Handler<SqlConnection> handler)

      Deprecated.
      Description copied from interface: `Pool`
      Set an handler called when the pool has established a connection to the database.

      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.

      Specified by:
        `connectHandler` in interface `Pool`
      Parameters:
        `handler` - the handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### connectionProvider

          MySQLPool connectionProvider(java.util.function.Function<Context,Future<SqlConnection>> provider)

      Deprecated.
      Description copied from interface: `Pool`
      Replace the default pool connection provider, the new `provider` returns a future connection for a given `Context`.

      A `ConnectionFactory` can be used as connection provider.

      Specified by:
        `connectionProvider` in interface `Pool`
      Parameters:
        `provider` - the new connection provider
      Returns:
        a reference to this, so the API can be used fluently

Copyright © 2024 Eclipse. All rights reserved.