Class 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.

    • Constructor Detail

      • ClientBuilder

        public ClientBuilder​(ClientBuilder delegate)
      • ClientBuilder

        public ClientBuilder​(Object delegate,
                             TypeArg<C> typeArg_0)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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
      • build

        public C build()
        Build and return the client.
        Returns:
        the client
      • connectingTo

        public ClientBuilder<C> connectingTo​(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