Interface DB2Builder
public interface DB2Builder
Entry point for building DB2 clients.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic ClientBuilder<SqlClient> client()Provide a builder for DB2 client backed by a connection pool.static SqlClientclient(Handler<ClientBuilder<SqlClient>> handler) Build a client backed by a connection pool with the specifiedblockargument.static ClientBuilder<Pool> pool()Provide a builder for DB2 pool of connectionsstatic Poolpool(Handler<ClientBuilder<Pool>> block) Build a pool with the specifiedblockargument.
-
Method Details
-
pool
Build a pool with the specifiedblockargument. Theblockargument is usually a lambda that configures the provided builderExample usage:
Pool pool = PgBuilder.pool(builder -> builder.connectingTo(connectOptions));- Returns:
- the pool as configured by the code
block
-
pool
Provide a builder for DB2 pool of connectionsExample usage:
Pool pool = PgBuilder.pool().connectingTo(connectOptions).build() -
client
Build a client backed by a connection pool with the specifiedblockargument. Theblockargument is usually a lambda that configures the provided builderExample usage:
SqlClient client = PgBuilder.client(builder -> builder.connectingTo(connectOptions));- Returns:
- the client as configured by the code
block
-
client
Provide a builder for DB2 client backed by a connection pool.Example usage:
SqlClient client = PgBuilder.client().connectingTo(connectOptions).build()
-