Class MySQLPool

    • Constructor Detail

      • MySQLPool

        public MySQLPool​(MySQLPool delegate)
        Deprecated.
      • MySQLPool

        public MySQLPool​(Object delegate)
        Deprecated.
    • Method Detail

      • equals

        public boolean equals​(Object o)
        Deprecated.
        Overrides:
        equals in class Pool
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Pool
      • pool

        public 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

        public 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
      • client

        public 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:
        connectOptions -
        poolOptions - the options for creating the backing pool
        Returns:
        the client
      • client

        public 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
      • connectHandler

        public MySQLPool connectHandler​(Handler<SqlConnection> handler)
        Deprecated.
        Description copied from class: 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.

        Overrides:
        connectHandler in class Pool
        Parameters:
        handler - the handler
        Returns:
        a reference to this, so the API can be used fluently
      • connectionProvider

        public MySQLPool connectionProvider​(Function<Context,​io.reactivex.rxjava3.core.Single<SqlConnection>> provider)
        Deprecated.
        Description copied from class: Pool
        Replace the default pool connection provider, the new provider returns a future connection for a given .

        A ConnectionFactory can be used as connection provider.

        Overrides:
        connectionProvider in class Pool
        Parameters:
        provider - the new connection provider
        Returns:
        a reference to this, so the API can be used fluently
      • pool

        public static MySQLPool pool​(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
      • client

        public static SqlClient client​(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