Search in sources :

Example 1 with MySQLPoolImpl

use of io.vertx.mysqlclient.impl.MySQLPoolImpl in project vertx-sql-client by eclipse-vertx.

the class MySQLDriver method newPool.

@Override
public MySQLPool newPool(Vertx vertx, List<? extends SqlConnectOptions> databases, PoolOptions options, CloseFuture closeFuture) {
    VertxInternal vx = (VertxInternal) vertx;
    PoolImpl pool;
    if (options.isShared()) {
        pool = vx.createSharedClient(SHARED_CLIENT_KEY, options.getName(), closeFuture, cf -> newPoolImpl(vx, databases, options, cf));
    } else {
        pool = newPoolImpl(vx, databases, options, closeFuture);
    }
    return new MySQLPoolImpl(vx, closeFuture, pool);
}
Also used : SqlConnectOptions(io.vertx.sqlclient.SqlConnectOptions) VertxInternal(io.vertx.core.impl.VertxInternal) QueryTracer(io.vertx.sqlclient.impl.tracing.QueryTracer) Vertx(io.vertx.core.Vertx) ConnectionFactory(io.vertx.sqlclient.spi.ConnectionFactory) ContextInternal(io.vertx.core.impl.ContextInternal) MySQLConnectionImpl(io.vertx.mysqlclient.impl.MySQLConnectionImpl) Driver(io.vertx.sqlclient.spi.Driver) MySQLPoolImpl(io.vertx.mysqlclient.impl.MySQLPoolImpl) PoolImpl(io.vertx.sqlclient.impl.PoolImpl) Collectors(java.util.stream.Collectors) VertxMetrics(io.vertx.core.spi.metrics.VertxMetrics) MySQLConnectionFactory(io.vertx.mysqlclient.impl.MySQLConnectionFactory) PoolOptions(io.vertx.sqlclient.PoolOptions) Connection(io.vertx.sqlclient.impl.Connection) List(java.util.List) MySQLPool(io.vertx.mysqlclient.MySQLPool) CloseFuture(io.vertx.core.impl.CloseFuture) MySQLConnectionUriParser(io.vertx.mysqlclient.impl.MySQLConnectionUriParser) JsonObject(io.vertx.core.json.JsonObject) ClientMetrics(io.vertx.core.spi.metrics.ClientMetrics) MySQLConnectOptions(io.vertx.mysqlclient.MySQLConnectOptions) SqlConnectionInternal(io.vertx.sqlclient.impl.SqlConnectionInternal) VertxInternal(io.vertx.core.impl.VertxInternal) MySQLPoolImpl(io.vertx.mysqlclient.impl.MySQLPoolImpl) MySQLPoolImpl(io.vertx.mysqlclient.impl.MySQLPoolImpl) PoolImpl(io.vertx.sqlclient.impl.PoolImpl)

Aggregations

Vertx (io.vertx.core.Vertx)1 CloseFuture (io.vertx.core.impl.CloseFuture)1 ContextInternal (io.vertx.core.impl.ContextInternal)1 VertxInternal (io.vertx.core.impl.VertxInternal)1 JsonObject (io.vertx.core.json.JsonObject)1 ClientMetrics (io.vertx.core.spi.metrics.ClientMetrics)1 VertxMetrics (io.vertx.core.spi.metrics.VertxMetrics)1 MySQLConnectOptions (io.vertx.mysqlclient.MySQLConnectOptions)1 MySQLPool (io.vertx.mysqlclient.MySQLPool)1 MySQLConnectionFactory (io.vertx.mysqlclient.impl.MySQLConnectionFactory)1 MySQLConnectionImpl (io.vertx.mysqlclient.impl.MySQLConnectionImpl)1 MySQLConnectionUriParser (io.vertx.mysqlclient.impl.MySQLConnectionUriParser)1 MySQLPoolImpl (io.vertx.mysqlclient.impl.MySQLPoolImpl)1 PoolOptions (io.vertx.sqlclient.PoolOptions)1 SqlConnectOptions (io.vertx.sqlclient.SqlConnectOptions)1 Connection (io.vertx.sqlclient.impl.Connection)1 PoolImpl (io.vertx.sqlclient.impl.PoolImpl)1 SqlConnectionInternal (io.vertx.sqlclient.impl.SqlConnectionInternal)1 QueryTracer (io.vertx.sqlclient.impl.tracing.QueryTracer)1 ConnectionFactory (io.vertx.sqlclient.spi.ConnectionFactory)1