io.vertx.rxjava3.sqlclient

## Class ClientBuilder<C>

- java.lang.Object
- - io.vertx.rxjava3.sqlclient.ClientBuilder<C>

-     public class ClientBuilder<C>
      extends Object

  Builder for `SqlClient` instances.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<ClientBuilder>` | `__TYPE_ARG`
    `io.vertx.lang.rx.TypeArg<C>` | `__typeArg_0`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientBuilder(ClientBuilder delegate)`
    `ClientBuilder(Object delegate, io.vertx.lang.rx.TypeArg<C> typeArg_0)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `C` | `build()` Build and return the client.
    `ClientBuilder<C>` | `connectingTo(List<SqlConnectOptions> databases)` Configure the `database` the client should connect to.
    `ClientBuilder<C>` | `connectingTo(SqlConnectOptions database)` Configure the `database` the client should connect to.
    `ClientBuilder<C>` | `connectingTo(String database)` Configure the `database` the client should connect to.
    `ClientBuilder<C>` | `connectingTo(java.util.function.Supplier<Future<SqlConnectOptions>> supplier)` Configure the `database` the client should connect to.
    `boolean` | `equals(Object o)`
    `ClientBuilder` | `getDelegate()`
    `int` | `hashCode()`
    `static <C> ClientBuilder<C>` | `newInstance(ClientBuilder arg)`
    `static <C> ClientBuilder<C>` | `newInstance(ClientBuilder arg, io.vertx.lang.rx.TypeArg<C> __typeArg_C)`
    `String` | `toString()`
    `ClientBuilder<C>` | `using(Vertx vertx)` Sets the vertx instance to use.
    `ClientBuilder<C>` | `with(PoolOptions options)` Configure the client with the given pool `options`
    `ClientBuilder<C>` | `withConnectHandler(Handler<SqlConnection> handler)` Set a handler called when the pool has established a connection to the database.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<ClientBuilder> __TYPE_ARG

    - #### __typeArg_0

          public final io.vertx.lang.rx.TypeArg<C> __typeArg_0

  - ### Constructor Detail

    - #### ClientBuilder

          public ClientBuilder(ClientBuilder delegate)

    - #### ClientBuilder

          public ClientBuilder(Object delegate,
                               io.vertx.lang.rx.TypeArg<C> typeArg_0)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public ClientBuilder getDelegate()

    - #### with

          public ClientBuilder<C> with(PoolOptions options)

      Configure the client with the given pool `options`
      Parameters:
        `options` - the pool options
      Returns:
        a reference to this, so the API can be used fluently

    - #### connectingTo

          public ClientBuilder<C> connectingTo(SqlConnectOptions database)

      Configure the `database` the client should connect to. The target `database` is specified as a `SqlConnectOptions` coordinates.
      Parameters:
        `database` - the database coordinates
      Returns:
        a reference to this, so the API can be used fluently

    - #### connectingTo

          public ClientBuilder<C> connectingTo(String database)

      Configure the `database` the client should connect to. The target `database` is specified as a `SqlConnectOptions` coordinates.
      Parameters:
        `database` - the database URI
      Returns:
        a reference to this, so the API can be used fluently

    - #### connectingTo

          public ClientBuilder<C> connectingTo(List<SqlConnectOptions> databases)

      Configure the `database` the client should connect to. When the client needs to connect to the database, it gets a database configuration from the list of `databases` using a round-robin policy.
      Parameters:
        `databases` - the list of database coordinates
      Returns:
        a reference to this, so the API can be used fluently

    - #### using

          public ClientBuilder<C> using(Vertx vertx)

      Sets the vertx instance to use.
      Parameters:
        `vertx` - the vertx instance
      Returns:
        a reference to this, so the API can be used fluently

    - #### withConnectHandler

          public ClientBuilder<C> withConnectHandler(Handler<SqlConnection> handler)

      Set a 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.

      Parameters:
        `handler` - the handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### build

          public C build()

      Build and return the client.
      Returns:
        the client

    - #### connectingTo

          public ClientBuilder<C> connectingTo(java.util.function.Supplier<Future<SqlConnectOptions>> supplier)

      Configure the `database` the client should connect to. When the client needs to connect to the database, it gets fresh database configuration from the database `supplier`.
      Parameters:
        `supplier` - the supplier of database coordinates
      Returns:
        a reference to this, so the API can be used fluently

    - #### newInstance

          public static <C> ClientBuilder<C> newInstance(ClientBuilder arg)

    - #### newInstance

          public static <C> ClientBuilder<C> newInstance(ClientBuilder arg,
                                                         io.vertx.lang.rx.TypeArg<C> __typeArg_C)

Copyright © 2024 Eclipse. All rights reserved.